Key mapping for JOptionPane

My problem is pretty simple. When presented with a YES_NO_CANCEL option, I want the escape key to trigger the CANCEL operation.
I've tried numerous methods including creating my own JOptionPane, adding/removing KeyListeners, etc., but I can't seem to get around this default behavior. Any suggestions?
Michael

By default, the Esc key closes the dialog with a return value of JOptionPane.CLOSED_OPTION. Why can't you simply perform the same action as when the return value is JOptionPanel.CANCEL_OPTION ?
db
edit Or even reassign the return value, if you prefer to do that (I wouldn't)int retVal = JOptionPane.showOptionDialog(...);
if (retVal == JOptionPane.CLOSED_OPTION) {
   retVal = JOptionPane.CANCEL_OPTION;
}Edited by: Darryl.Burke

Similar Messages

  • Question about key mapping for bank data in SP3 standard Vendor Repository

    Hello Colleagues:
    The situation is the following:
    1) MDM Standard vendor repository does not use Key Mapping for the qualified table data "Bank Details". This makes sense because normally you would pay a vendor in the same account and bank regardless of the company or R/3 system you are paying him from.
    2) However, here in my project customer don't have the same bank data for all of the 3 R/3 Systems. Furthermore, they would like to pay a vendor in a diferent bank and account number; depending on where the payment is generated (Company or R/3 system).
    Because of this, I though about creating a lookup table for the banks which would use key mapping. I did this and I had no trouble importing bank data in to it.
    Now I have this tables:
    1) Banks: Lookup Flat:
    Country and Bank Key as display fields.
    2) Bank Details: Qualified Flat:
    2.a) Field "Bank" as a non-qualifier display lookup field which points to a record on "Banks" table (Described in number 1).
    2.b) The rest of the fields (Account number, Account holder, Reference, etc.) as qualifier non-display fields.
    This aproach works well in data manager.
    However, when I try to import vendors from R/3, I'm not being able to map the bank details, not even with "compound field" functionality, because I cannot map the display fields in the "Banks" lookup table (Described in number 1); in the "Map Fields/Values" tab in the Destination fields pane, it won't show any fields from this table.
    Also, I'm not very sure if I will be able to syndicate this data back to the R/3 systems correctly, this is; replicate only the banks which exist on each R/3 client system.
    Any ideas on how to solve this problem? Please help.
    Best Regards,
    Jorge.

    ... Where
    did Terminal's default keystrokes (e.g., Esc,[5C for
    ctrl-right-arrow) come from? They just produce
    annoying beeps in bash. Are they standard sequences
    for some shell that I don't know about? I
    Somewhere deep in the bowels of computer history....for example
    http://vt100.net/docs/vt100-ug/table3-6.html
    http://www.termsys.demon.co.uk/vtansi.htm#cursor
    that is to say, these codes date back to early hardware terminals such as the VT100. I believe. And that is why Terminal is a member of a class of software called "terminal emulators".

  • Key mapping for forms on web

    Presently we are using forms 4.5. We have got costomise key
    mapping for operating through forms. Now we want to start forms
    on web (Intranet). Earlier we use to change key mapping through
    oracle*terminal. I require help in knowing how to customise key
    mapping in forms 6i / oracle 8.1.7.

    Hi,
    Boy, I have some good news to you: Oracle*Terminal is no longer
    needed.
    WordPad (or your favorite text editor) is your tool from now on.
    Keyboard files are located in $ORACLE_HOME\FORMS60.
    Simply ignore the binary file fmrusw.res when you run Forms on
    the Web. FMRWEB.RES is the one that is used, and it's pure ASCII.
    There are some comments in the file itself.
    The keys are the same as the Motif version of Forms.
    If you prefer the Windows keys, simply use FMRPCWEB.RES instead.
    How? Check under $ORACLE_HOME\FORMS60\SERVER for your
    formsweb.cfg, go to User Parameters and replace the
    otherparams=
    line with
    otherparams=term=%forms60%\fmrpcweb.res
    Now, anyone can define the Function-0 till Function-9 key
    combinations, in order to use KEY-F0 till KEY-F9 triggers.
    Hope this helps,
    Pedro das Neves
    [email protected]

  • Change Key Mapping for RWMS handheld application

    Dear Experts,
    When we login to handheld in rwms
    http://hostname:9001/forms/frmservlet?config=rwms1324inst_hh
    we are login with USERID: PAR3214
                               PASSWD:PAR3214
                              FACILITY ID : PR
    Now, if we press CTRL+F4, it is login
    My requirment is to change the login option.  Instead of CTRL+F4, it should be mapped to something else like "SHIFT+F4" particularly for RWMS hand held applications.
    Regards,
    Ratnesh

    Hi Ratnesh
    RWMS 14.1 Install Guide ( http://docs.oracle.com/cd/E12456_01/rwms/pdf/141/rwms-141-ig-05.pdf ) has good details on this:
    Update fmrweb.res for Keymapping
    The fmrweb.res file is used to specify key-mapping for the radio frequency devices that are set up in the formsweb.cfg file.
    1. Depending upon device this file may need to be updated.
    2. The installer places a copy in the directory specified in the formsweb.cfg file for each radio frequency URL that is created
    3. The fmrweb.res file comes with key-mapping of CTRL+<number> to work for function keys by default.
    This fmrweb.res is passed as a parameter in formsweb.cfg as otherparams variable.
    Thanks
    Amod

  • Key Mapping for Flat lookup tables

    Hi,
    How do we decide if we need to make Key Mapping "Yes" for flat look-up tables?
    Can anyone plz explain with an eg on where to make key mapping yes or no for Flat Tables.
    Thanks,
    Ketan

    Hi,
    Can anyone plz explain with an eg on where to make key mapping yes or no for Flat Tables.
    1. A remote system’s objects are mapped to master data objects within MDM using key mapping. A key mapping maintains the relationship between the remote system’s identifier (or key) for an object and the corresponding master data object in MDM.
    2. in the data manger based upon some strategy, you found that 4 records are duplicate, and then you merged into single record.
    the merged record is having 4 records inside it with respective remote keys.
    if you want to edit those records, key mapping should be enabled for that particular table.
    3. while harmonizing the records to the respective client systems, you can use edit key mapping functionality for merged records.
    if you enabled key mapping functionality in the console for the particular table, then only you can aceess EDIT KEY MAPPINGS functionality in data manager & syndicator.
    hope this may help you,
    Regards,
    Srinivas

  • FCP pre-created key mapping for other NLE's?

    The key mapping feature of FCP is handy because you can set up
    a custom keyboard that emulates another NLE editing system that you
    might be more familiar with while learning FCP (i.e. Avid).
    Does anybody know if anyone has created keyboard mapping
    file presets for download or purchase? I'm interested in emulating
    Pinnacle key mapping in FCP. I realize I can manually create it but thought
    perhaps there was a source you could go to where it was already done
    for you.
    Any input would be appreciated.
    Thanks.

    I don't think there's any place to buy them.. you might find a user on here who has emulated something like that and could email it to you. I use a keyboard mapping similar to Avid but it really is the best of both keyboards in one IMHO.
    it's easy to map so with the time spent searching you could probably make it to your liking.

  • Key Mapping for iTunes use

    I just got my keyboard replaced for the third time, all not my fault so covered under my warranty. The keyboard I had before this one was the newest version with the play/pause, forward, and backward keys on the f7, f8, and f9. My latest keyboard is the old version without those keys, but I used those keys often. Is there some way I can program or map those keys to be the same as the newest version keyboard.
    Thank you! Meghan

    Technically "AirPort Ready" indicates that your Mac has an internal slot for the proper Apple wireless card.
    A Power Mac G4 800 MHz has an internal slot for the original AirPort card. It is not compatible with the AirPort Extreme card
    AirPort Extreme is Apple's name for 802.11g. The original AirPort card is 802.11b.
    802.11g is backward compatible with 802.11b. In other words, 802.11b devices can connect to a 802.11g device as long as the 802.11g device is configured in an 802.11b compatible mode.
    AirTunes is only available on the AirPort Express.

  • Regarding the key mapping for 10g forms as in 6i forms

    Hi All,
    I want the kep mappings of oracle forms 6i to be implemented in oracle forms 10g. I have made the changes in the fmrweb.res file as shown below. Can any one just check it once and let me know whether the mapping is correct?.
    116 : 1 : "Shift+F5" : 69 : "Clear Block"
    85 : 2 : "Ctrl+U" : 3 : "Clear Field"
    118 : 1 : "Shift+F7" : 74 : "Clear Form"
    115 : 1 : "Shift+F4" : 62 : "Clear Record"
    117 : 1 : "Shift+F6" : 63 : "Delete Record"
    112 : 1 : "Shift+F1" : 78 : "Display Error" XX
    76 : 2 : "Ctrl+L" : 7 : "Down"
    40 : 0 : "Down" : 7 : "Down"
    114 : 0 : "F3" : 73 : "Duplicate Field"
    115 : 0 : "F4" : 64 : "Duplicate Record"
    69 : 2 : "Ctrl+E" : 22 : "Edit"
    118 : 0 : "F7" : 76 : "Enter Query"
    119 : 0 : "F8" : 77 : "Execute Query"
    112 : 0 : "F1" : 30 : "Help"
    120 : 3 : "F9" : 29 : "List of Values"
    117 : 0 : "F6" : 62 : "Clear Record"
    34 : 2 : "Ctrl+PageDown" : 71 : "Next Block"
    9 : 2 : "ctrl+Tab" : 1 : "Next Field"
    114 : 1 : "Shift+F3" : 61 : "Next Primary Key"
    1005 : 1 : "Shift+Down" : 67 : "Next Record"
    119 : 2 : "Ctrl+>" : 66 : "Next Set of Records"
    33 : 2 : "Ctrl+PageUp" : 72 : "Previous Block"
    9 : 3 : "Shift+Crtl+Tab" : 2 : "Previous Field"
    38 : 1 : "Shift+Up" : 68 : "Previous Record"
    119 : 1 : "Shift+F8" : 79 : "Print"
    112 : 2 : "Ctrl+F1" : 35 : "Show Keys"
    80 : 2 : "Ctrl+P" : 6 : "Up"
    I am not able to find the mapping keys for the following keys of 6i in 10g. Can these keys be mapped?.
    Accept
    Cancel
    Count Matching Records
    Debug Mode
    Delete Backward
    Left
    New Record
    Next Set Of Records
    Previous Menu
    Return
    Right
    Regards,
    Prasad.

    I think this one will have both keys in 10g from forms 6i/10g...and the rest you asked.
    9    : 0 : "Tab"            : 1  : "Next Field"
    9    : 2 : "Ctrl+Tab"         : 1  : "Next Field"
    9    : 1 : "Shift+Tab"      : 2  : "Previous Field"
    9    : 3 : "Shift+Ctrl+Tab" : 2  : "Previous Field"
    85   : 2 : "Ctrl+U"         : 3  : "Clear Field"
    38   : 0 : "Up"             : 6  : "Up"
    40   : 0 : "Down"           : 7  : "Down"
    33   : 0 : "PageUp"         : 12 : "Scroll Up"
    34   : 0 : "PageDown"       : 13 : "Scroll Down"
    69   : 2 : "Ctrl+E"         : 22 : "Edit"
    10   : 0 : "Enter"         : 27 : "Return"
    120  : 0 : "F9"              : 29 : "List of Values"
    76   : 2 : "Ctrl+L"         : 29 : "List of Values"
    81   : 2 : "Ctrl+Q"         : 32 : "Exit"
    75   : 2 : "Ctrl+K"         : 35 : "Show Keys"
    112  : 2 : "Ctrl+F1"         : 35 : "Show Keys"
    83   : 2 : "Ctrl+S"         : 36 : "Commit"
    121  : 2 : "F10"         : 36 : "Commit"
    114  : 1 : "Shift+F3"       : 61 : "Next Primary Key"
    115  : 1 : "Shift+F4"       : 62 : "Clear Record"
    117  : 1 : "Shift+F6"       : 63 : "Delete Record"
    115  : 0 : "F4"             : 64 : "Duplicate Record"
    117  : 0 : "F6"             : 65 : "Insert Record"
    119  : 1 : "Shift+F8"       : 66 : "Next Set of Records"
    1005 : 0 : "Down"           : 67 : "Next Record"
    1004 : 0 : "Up"             : 68 : "Previous Record"
    40   : 1 : "Shift+Down"     : 67 : "Next Record"
    38   : 1 : "Shift+Up"       : 68 : "Previous Record"
    116  : 1 : "Shift+F5"       : 69 : "Clear Block"
    116  : 0 : "F5"              : 70 : "Block Menu"
    34   : 1 : "Shift+PageDown" : 71 : "Next Block"
    33   : 1 : "Shift+PageUp"   : 72 : "Previous Block"
    34   : 2 : "Ctrl+PageDown"  : 71 : "Next Block"
    33   : 2 : "Ctrl+PageUp"    : 72 : "Previous Block"
    114  : 0 : "F3"             : 73 : "Duplicate Field"
    118  : 1 : "Shift+F7"       : 74 : "Clear Form"
    118  : 0 : "F7"             : 76 : "Enter Query"
    119  : 0 : "F8"             : 77 : "Execute Query"
    122  : 0 : "F11"            : 76 : "Enter Query"
    122  : 2 : "Ctrl+F11"       : 77 : "Execute Query"
    112  : 1 : "Shift+F1"         : 78 : "Display Error"
    80   : 2 : "Ctrl+P"         : 79 : "Print"
    113  : 1 : "Shift+F2"         : 80 : "Count Query"
    123  : 0 : "F12"            : 81 : "Update Record"
    121  : 3 : "Shift+Ctrl+F10" : 82 : "Function 0"
    112  : 3 : "Shift+Ctrl+F1"  : 83 : "Function 1"
    113  : 3 : "Shift+Ctrl+F2"  : 84 : "Function 2"
    114  : 3 : "Shift+Ctrl+F3"  : 85 : "Function 3"
    115  : 3 : "Shift+Ctrl+F4"  : 86 : "Function 4"
    116  : 3 : "Shift+Ctrl+F5"  : 87 : "Function 5"
    117  : 3 : "Shift+Ctrl+F6"  : 88 : "Function 6"
    118  : 3 : "Shift+Ctrl+F7"  : 89 : "Function 7"
    119  : 3 : "Shift+Ctrl+F8"  : 90 : "Function 8"
    120  : 3 : "Shift+Ctrl+F9"  : 91 : "Function 9"
    113  : 0 : "F2"             : 95 : "List Tab Pages"
    72   : 2 : "Ctrl+H"         : 30 : "Help"
    112  : 0 : "F1"              : 30 : "Help"

  • Terminal key mapping for control-arrow, home, end, etc.

    This isn't exactly an "I need it now" kind of question, but in brief, what was Apple thinking when they set up the default behavior of ctrl-left-arrow, ctrl-right-arrow, home and end in Terminal?
    I'm using OS X 10.4, with the default bash shell. I would like the above-mentioned keystrokes to act like they do in Windows, moving to the beginning and end of words and lines, respectively. I know a couple of ways to do this:
    (1) use the Terminal -> Window Settings -> Keyboard window to remap these keys to send the strings (Esc,b), (Esc,f), ctrl-a and ctrl-e; or
    (2) add entries to ~/.inputrc to remap Terminal's default strings for these keys to perform the desired action (see http://koorb.co.uk/scrapbook/ or http://www.macosxhints.com/article.php?story=20050525040921189 ).
    So, I'm pretty happy now. But I want to make sure I choose the "right" approach, so I want to know which of these approaches is more "normal." Or in other words, why didn't this work in the first place? Where did Terminal's default keystrokes (e.g., Esc,[5C for ctrl-right-arrow) come from? They just produce annoying beeps in bash. Are they standard sequences for some shell that I don't know about? If not, why did Apple pick these keystrokes, instead of using something like "ctrl-E" which would do something useful in bash, which is after all the default shell? I'm basically trying to decide whether I should fix Terminal or fix the shell to work the way I want.
    On a related note, does anyone have any idea how I can get command-right-arrow and command-left-arrow to go to the beginning and end of a line in Terminal, instead of switching between Terminal windows?
    Thanks for your help!

    ... Where
    did Terminal's default keystrokes (e.g., Esc,[5C for
    ctrl-right-arrow) come from? They just produce
    annoying beeps in bash. Are they standard sequences
    for some shell that I don't know about? I
    Somewhere deep in the bowels of computer history....for example
    http://vt100.net/docs/vt100-ug/table3-6.html
    http://www.termsys.demon.co.uk/vtansi.htm#cursor
    that is to say, these codes date back to early hardware terminals such as the VT100. I believe. And that is why Terminal is a member of a class of software called "terminal emulators".

  • Soft key mapping for Nokia6682

    What are the two softkeys on left and right of the 4 way pad
    called.
    I tried
    on (keyPress "<PageUp>") and <PageDown>
    Neither of these worked?
    up, down, left, right, and enter are mapped to the joystick.
    any help

    Ciao
    are you working on FL1.1?
    To use the soft keys you need first to reset them:
    fscommand2("SetSoftKeys", "", "");
    Then you can use the soft keys PageUp and PageDown
    Alessandro

  • Key Mapping for Forms

    Hi All,
    I have 100+ forms, I want to disable some keys in them. e.g. Key-Menu, key-duprec. I can not put a trigger with trigger text 'null;' in each form or inherit an object group and generate again. Can I do something global to remove these key mappings?
    Regards
    Mona

    Mona,
    just an idea: maybe you can create your own keyboard file (.res -file) and assign 'harmless' values to
    Key-menu and key-duprec. Then use the term= tag when you call a form, eg:
    form=<yourform> term=<yourterm-file>
    kind regards,
    Ivan
    >Hi All,
    I have 100+ forms, I want to disable some keys in them. e.g. Key-Menu, key-duprec. I can not put a trigger with trigger text 'null;' in each form or inherit an object group and generate again. Can I do something global to remove these key mappings?
    Regards
    Mona

  • MDM Exception: Key mapping value must be unique. You cannot overwrite key

    "ServerException: Key mapping value must be unique. You cannot overwrite key mapping values."
    I received such exception when code tried to manipulate Key Mappings of the record.
    error was not happen on mdm 5.5 but on 7.1 it sometimes appears.
    What is probable reason of this?
    How to resolve this ?
    Code is approximate so:
                                         String[] keys = keyMapping.getKeys();
                        if (recordKeyMapping.containsKeyMapping(remoteSystem)) {
                    recordKeyMapping.replace(remoteSystem, keys);
              else {
                   recordKeyMapping.addKeyMapping(keyMapping);
              //Persist
              targetRecord.update();
    //where methods are:
         public void replace(RemoteSystem remoteSystem, String[] keys) {
              KeyMapping keyMapping = getKeyMapping(remoteSystem);
              if (keyMapping == null) throw new IllegalArgumentException("Can't update keys: key mapping for the system '" + remoteSystem + "' is not found");
              else {
                   keyMapping.setKeys(keys);
         public void addKeyMapping(KeyMapping keyMapping) {
              RemoteSystem remoteSystem = keyMapping.getRemoteSystem();
              for(int i = 0; i < keyMapping.size(); i++) {
                   addKey(remoteSystem, (String) keyMapping.get(i));
    Edited by: Vladimir Grigoryev on Oct 5, 2010 11:26 AM

    Hello -
    I am not sure on that coding part. but is it like are you trying to retrive Key Mapping from Memory accelerator. Here this information always needs to be read from Database.
    I am sure you also maintained  the required attribute for key mapping as in Property in Console should be set as "Yes" and other relevant things properly .
    Here also go through the below link for more insight from tools perspective.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30843106-5539-2b10-75a9-da483911b0d9
    http://help.sap.com/javadocs/mdm/sp06/com/sap/mdm/data/KeyMapping.html
    It may help
    Rgds
    Deep

  • Key Mapping Sample

    Hi
    Is there any simple key mapping sample?
    I would like to create a protoype loading (manually) a materials base from different sources (companies) and later try to create key mapping, in order to understand how this key mapping works.
    Regards,
    Ronaldo.

    Hi Roman
    Thanks for your answer.
    As I am beginner in MDM, I am not even sure if key mapping is what I need.
    What I want to do is:
    - Simulate a group with 3 companies. In this group each company has its own materials database. So, let's suppose a certain material has a different code in each company.
    - In company A, this material is called A1.
    - In company B, this material is called B1.
    - And in company C, C1.
    After these material bases have been loaded in MDM, someone would analyze these products, and based on there coincident physical characteristics conclude: OK, all are the same material. All these materials would receive a UNIQUE identification, which could be used to generate cross-company reports, allowing these "different" products be grouped together (or compared).
    This UNIQUE Identification should be something like below:
    Product  Company   Unique Code
    A1       A         X001
    B1       B         X001
    C1       C         X001
    Is that the objective of Key mapping?
    If so, I am having some problems to make it works:
    - There is a agency field in Key Mapping. What it means? Would it be the same as "company" in example above? If so, why there is no Agency field in records that I insert manually...I feel I am missing some important concept here.
    - When I insert a key mapping for my second product, the key mapping for the first one is delete. Why?
    Definitively I know that my questions are very basic (and boring, probably). If there is a tutorial for newbies, I would appreciate.
    Regards,
    Ronaldo.

  • MDM API to read the Record Key Mapping table

    Hi,
    Does anybody know what class/method I can use to read the Record Key Mapping table?
    For the Business Partner table the Key Mapping table has this columns:
    <u>Default / MDM Partner ID / Remote System / Key</u>
    I have everything but the Key. How can I read it?
    Thanks in advance,
    Diego.

    GetKey Mapping is one of the available Web Services as of SP4.
    Else you could use the Java API to get the Key Mapping.
    <b>CatalogData class</b> has the following method
    <b>GetKeyMapping</b>
    public java.lang.String[][] GetKeyMapping(java.lang.String agency,
                                              java.lang.String table,
                                              int[] recordIDs,
                                              boolean isDefaultKeyOnly)
                                       throws StringExceptionRetrieves the key mapping for each record.
    Parameters:
    agency - the agency name.
    table - the table name.
    recordIDs - the list of records.
    isDefaultKeyOnly - True to retrieve only the default value, False to all key values.
    Returns: the key values for each record.

  • ABAP API and Key Mapping

    Hello there,
    I am trying to use the MDM 7.1 ABAP API to access MDM data from within a BI system.
    Now I am wondering how to access key mapping for records in the Main Table.
    In the Java API there is the RetrieveRecordsKeyMappingsCommand which returns all key mapping information for a list of record IDs. But I cannot find something similar in the ABAP API.
    Who knows where to start?
    Thanks for hints
    Ingo

    Hi ,
    In ABAP API also you can retrieve key mapping of main table records using function 'MDM_API_RETR_CLIENT_SYS_KEYS'.
    You will get details of this function in sap library or ABAP API documentation provided by SAP.
    For any further queries kindly reply.
    Regards,
    Neethu Joy

Maybe you are looking for