No key event when compose keys are pressed

I am supporting a legacy application for Sabre which maps some of the keys differently. For example, on a French keyboard the Compose key which is used to put a ^ on top of the vowel characters is to be remapped to produce a special character called a "Change Character" that has a special use for reservation agents that use Sabre
The problem is, the first time you press the ^ compose key there is no key event apparently because the VM figures it doesn't yet know what key to report, it is expecting you to press a character such as 'o' and then you get an 'o' with a '^' on top of it.
If you press the ^ compose key a second time, you get the following key events:
keyPressed
keyTyped
keyTyped
keyReleased
On the screen you will see two ^ characters appear. Currently I remap the ^ character to the "Change Character", and I suppress the second keyTyped event so that I only get one character. The problem is that the user ends up having to press the key twice to get one "Change Character."
I have no fix for this problem because there is no key event produced when they press the ^ compose key the first time.
By the way, this behavior appears to have been introduced with jdk 1.3. The older jdk did produce a key event the first time you pressed the compose key. I would expect that this behavior was considered to be a bug and was fixed in jdk 1.3.
Is there some other way to detect when the user presses a compose key? If not, is it possible for future jdk releases to report a keyPressed event when a compose key is pressed? This event would not cause a character to appear on the screen, but would allow programs to detect when the compose key is pressed.
There is already a key on the French keyboard that behaves this way. It is the key to the left of the '1' key and it has the pipe symbol on it. If you press Shift plus this pipe key, no character is produces but a keyPressed event with a keycode of 222 is produced. I merely point this out to show that there is a way to report key events whithout producing output on the screen.
Thanks, Brian Bruderer

I don't know if this actually helps, but it seems that you can bind an Action to a dead key like the circumflex of the French keyboard
Keymap keymap = textPane.addKeymap("MyEmacsBindings", textPane.getKeymap());
Action action = getActionByName(DefaultEditorKit.beginAction );
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_DEAD_CIRCUMFLEX);
keymap.addActionForKeyStroke(key, action);I saw this on a Swing tutorial and modified it slightly. Have a look at it :
http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
Chris

Similar Messages

  • I have a 27" desktop mac running with OSX 10.6.8.  The bluetooth keyboard started not typing when some of the keys are pressed. Plugged in a wired keyboard, started doing the same thing.  Now the cursor moves but cannot select anything.  Suggestions?

    I have a 27" desktop mac running with OSX 10.6.8.  The bluetooth keyboard started not typing when some of the keys are pressed. Plugged in a wired keyboard, started doing the same thing.  When opening up a browser or application, the cursor moves but cannot select anything.  Suggestions?

    Maybe something in these Apple support articles will help.
    Keyboard Doesn’t Work
    Keyboard Keys Do Not Respond
    Keyboard/Mouse – Troubleshooting Wireless

  • Bluetooth Wireless Keyboard acting as if keys are pressed

    I've had an Apple Aluminum Bluetooth keyboard for over two years, and last week (after a fresh install of OS X Lion on my late 2009 Mac Mini) all of a sudden the Mac is acting as if multiple keys are pressed when nothing is touching the keyboard. I have updated all software, replaced the batteries, deleted and re-paired the keyboard (which was a massive struggle as it acted as if keys were depressed even during the pairing process). Nothing has ever been spilled on the keyboard. The only way to make the sound of the "phantom depressed key" go away and regain full control of the computer, is to remove the batteries from the keyboard.
    Strangely, the problem seemed to have been resolved somehow after I placed the "Show character viewer" icon in the main menu (ie. where there is usually a US/other nationality flag). After doing so, all of a sudden the problem disappeared.
    Now, exactly a week later, the problem has reappeared.
    Can anyone explain why a keyboard would act this way? Has anyone had a similar problem? Is there a fix?
    I'm a longtime reader of theese support discussion boards, but this is the first time I've posted. Let me know if there's information that I can provide that would help us solve this issue.
    Cheers.

    I have similar issue: both left and right shift keys time to time being pressed, it disappears after a while...but once I couldn't log in as the shift option puts caps lock on....really annoying.
    The only reason in my case is the keyboard cleaning that I have done recently...
    There is no quick fix for this I am afraid.
    Options:
    1.Apple replaces the keyboard you pay around £200 I think....
    2. Buy new keyboard on Ebay and replace it yourself £40....
    http://www.ifixit.com/Guide/MacBook+Pro+13-Inch+Unibody+Mid+2010+Keyboard+Replac ement/23632#s61162
    Anyway lets see.

  • How detect shift key release when both shift keys are pressed

    Why is no event fired when a shift key is released if both shift keys were pressed?
    1. Press left shift - keydown event
    2. Press right shift - keydown event
    3. Release left shift - no event
    4. Release right shift - keyup event
    So, we have two keydown events and just one keyup event.

    I think that the two shift keys are logically the same key and both provide VK_SHIFT. Since they are the same key, it's still down when the left key goes up and so no up fires. This behavour is inherited from the underlying keyboard input system and is the
    same as you'll see if you handle WM_KEYDOWN and WM_KEYUP in a Win32 app.
    You can differentiate the VirtualKey.LShift and RShift keys with CoreWindow.GetKeyState() or GetAsyncKeyState(), but there isn't a direct way to catch your state #3 in action.

  • IPhone letters don't pop up when keys are pressed

    You know how the letters pop up from under your finger when keys a pressed on the keyboard to let you know which key you press, well sometimes certain letters on my keyboard stop popping up. A restart fixes the key but a few minutes or hours (intermittent) later a different letter stops working. Anybody else have this problem?

    The problem seems to be related to the Auto-correct and Auto-capitalization feature. If I turn either one off (Settings->General->Keyboard), I don't have the problem but when both are on, it comes back. It also seems to affect the first character that I type in the input field.
    With both Auto features on, if I go to the login page of Twitter and type, say, a 'v' as the first character of the Username, a capital V is entered and the "V" pops up, but if I backspace, tap shift to go to lowercase and tap v again, the v does not pop up from the keyboard but it does show up in the username input field. I can reset things if I tap the Done button on the keyboard then tap in the username field to bring the keyboard back up. The problem is still there, but I can see it happen with a new letter if I want.
    Try it and post what you find. You don't have to have a Twitter account to see it happen and I'd be interested to know if it's consistent.

  • JSlider -- catch when arrow keys are pressed

    Hi,
    With a JSlider, when it has focus and a user presses the left/right arrow keys ..the thumb on the slider is moved to a new value. I tried adding a keyListener but that didnt work...how can I catch when a left/right arrow key is pressed??
    thanks

    You can take over the binding, but you will be responcible for the action....
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    public class KeyMappingEx extends JFrame
    JSlider slid;
        public KeyMappingEx()
            super( "Key Mapping Ex");
            setDefaultCloseOperation( EXIT_ON_CLOSE );
            slid  = new JSlider( 0, 100, 50 );
              slid.setMajorTickSpacing( 20 );
            slid.getInputMap( ).put( KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0, false),
                                       "RIGHT_ARROW" );
            slid.getActionMap().put( "RIGHT_ARROW", new RightAction(  ) );
            slid.getInputMap( ).put( KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0, false),
                                       "LEFT_ARROW" );
            slid.getActionMap().put( "LEFT_ARROW", new LeftAction(  ) );
            setContentPane( slid );
            pack();
            setLocationRelativeTo( null );
            setVisible( true );
        public static void main( String[] args )
            try
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch( Exception e )
            new KeyMappingEx();
        class RightAction extends  AbstractAction
            public void actionPerformed(ActionEvent e)
                System.out.println("RIGHT ARROW");
                slid.setValue( slid.getValue() + slid.getMajorTickSpacing() );
        class LeftAction extends  AbstractAction
            public void actionPerformed(ActionEvent e)
                System.out.println("LEFT ARROW");
                slid.setValue( slid.getValue() - slid.getMajorTickSpacing() );
    }

  • How to find out which keys are pressed while a d&d drop occurs?

    Hi,
    while an item is dropped as part of a drag and drop operation, I would like to know if the user has pressed any keys.
    I use a TransferHandler for managing the d&d and this works fine with the system dependent modifier keys for move, copy and link. But as my application needs to perform special actions if, for example, 'p' is pressed while a drop occurs, I'm stuck:
    It looks like there is neither a way to poll for pressed keys [like Keyboard.isPressed('p')] nor are there any key events fired as long as the d&d operation is active.
    I've tried a adding a key listener, adding a key binding and using the KeyboadFocusManager but nothing seems to work.
    Any ideas?
    Thanks,
    Norb

    Hi,
    the question is where the focus would be - because as you know unless there is a record in InputMap and keys are usually only received by focused component anyway. I'd recommend hooking into Swing event queue, something like that:
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(new EventQueue() {
        protected void dispatchEvent(AWTEvent event) {
            if (event instanceof KeyEvent && dragging) {
                // do something
    });

  • Some applications behave as though modifier keys are pressed

    I am experiencing occasions when some applications behave as though modifier keys are being pressed (ie Command Key, Option Key and Shift Key). At first I thought the problem was isolated to Adobe Creative Suite Applications but have now found that MYOB is also affected. I have tried multiple keyboards (even no keyboard) so I do not believe it is a keyboard hardware problem. I am running on the hardware and software listed below.
    When the problem occurs it immediately affects all applications listed below in the way described. Many other applications appear unaffected. The only way I have found to fix the problem is to reboot the machine. After rebooting, the problem may not reoccur for several days, or may reoccur within half an hour. This problem has been occurring since some time in December 2010. I have also confirmed that none of the behaviour listed below occurs when the problem isn't present.
    Affected Applications & Observed Behaviour:
    - Adobe Photoshop CS4: All tools behave as though the option key is being pressed (rendering them unusable).
    - Adobe Dreamweaver CS4: When clicking on the contents of an open file, Dreamweaver behaves as though Cmd+Opt is pressed (ie the code navigator appears making the program unusable)
    - All applications in Adobe CS4 Suite: Upon startup, each application behaves as though CmdOptShift is pressed (resets preferences).
    - MYOB: When the cursor is in a data field, the delete key behaves as though the option key is pressed (ie entire field is deleted rather than a single character)
    I have been working with Adobe telephone support without success for about 3 weeks but since noticing the problem also affects MYOB, it now seems feasible that it is caused by something outside of the Adobe Creative Suite.
    Any help would be appreciated.
    Message was edited by: Leon Borrack

    Leon,
    You are not alone - I sometimes suffer a similar issue and I don't use any Adobe software. For me, it manifests itself as modifier keys being pressed in Safari, Mail or Finder. This normally happens shortly after a wake from sleep. I'm using an old-style Bluetooth Apple keyboard on a Mac Pro 1,1. I can't tell you what causes it, but I can tell you the solution that I've found: If I relaunch Finder the problem goes away...
    To relaunch Finder (apologies if you already know this), press 'Cmd-Option-Escape', select 'Finder' and click relaunch. For some reason the seemingly stuck modifier is cleared. It's not an terribly elegant solution, but it is a lot quicker and less disruptive than rebooting.
    Hope that helps a little.
    Greg

  • Is it possible to fire an event when radio buttons are clicked in a report?

    Hi All,
    I have got a requirement. In the selection screen i have certain input fields and three radio buttons. When radio buttons are clicked i have to grey out certain input fields. Is it possible to fire an event when i write program through se38??
    Thanks
    Rakesh

    Hi Rakesh,
    Check this code.
    SELECTION-SCREEN BEGIN OF BLOCK FINPUT WITH FRAME TITLE TEXT-001.
    PARAMETERS  : FILENAME(132) TYPE C LOWER CASE  NO-DISPLAY,
                  FDLOAD RADIOBUTTON GROUP RAD1
                  USER-COMMAND R1 ,
                  FUPLOAD RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN END OF BLOCK FINPUT.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
    PARAMETERS : FUNAME(132) TYPE C LOWER CASE MODIF ID AA.
    SELECTION-SCREEN PUSHBUTTON /33(30) ACTION USER-COMMAND
                     BTNACT MODIF ID AA VISIBLE LENGTH 8 .
    SELECTION-SCREEN PUSHBUTTON 43(30) CANCEL USER-COMMAND
                     BTNCAN MODIF ID AA VISIBLE LENGTH 8  .
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS : FDNAME(132) TYPE C LOWER CASE MODIF ID BB.
    SELECTION-SCREEN PUSHBUTTON /33(30) ACTIONS USER-COMMAND
                     BTNACT1 MODIF ID BB VISIBLE LENGTH 8.
    SELECTION-SCREEN PUSHBUTTON 43(30) CANCELS USER-COMMAND
                     BTNCAN1 MODIF ID BB VISIBLE LENGTH 8.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA : ACTNAME(8) TYPE C,SCRGRUP(2) TYPE C.
    INITIALIZATION.
    ACTIONS = 'Download'.
    CANCEL = 'Cancel'.
    ACTION = 'Upload'.
    CANCELS = 'Cancel'.
    ACTNAME = 'Download'.
    SCRGRUP = 'AA'.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF FUPLOAD = 'X'.
         MOVE 'Upload' TO ACTION.
         MOVE 'Upload' TO ACTNAME.
    ELSEIF FDLOAD = 'X'.
         MOVE 'Download' TO ACTION.
         MOVE 'Download' TO ACTNAME.
    ENDIF.
    AT SELECTION-SCREEN.
    IF SY-UCOMM = 'R1'.
        IF ACTION = 'Download'.
          SCRGRUP = 'AA'.
         MESSAGE S007(ZMESSAGE).
        ELSEIF ACTION = 'Upload'.
          SCRGRUP = 'BB'.
         MESSAGE S008(ZMESSAGE).
       ENDIF.
    ELSEIF SY-UCOMM = 'BTNCAN' OR SY-UCOMM = 'BTNCAN1'.
      LEAVE PROGRAM.
    ENDIF.
    *AT USER-COMMAND.
    CASE SY-UCOMM.
       WHEN 'ACTIONS'.
         LOOP AT SCREEN.
           IF SCREEN-NAME = 'FUNAME'.
           ENDIF.
         ENDLOOP.
    ENDCASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FUNAME.
      PERFORM call_filedialog CHANGING FUNAME.
    PERFORM call_filedialog CHANGING FUNAME.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Download' .
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Upload'.
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    FORM call_filedialog CHANGING fname.
      DATA: li_filetable TYPE STANDARD TABLE OF file_table,
        lv_return TYPE i,
        lw_filetable TYPE file_table.
      CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
        TABLES
          file_table = li_filetable
        EXCEPTIONS
          cntl_error = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      READ TABLE li_filetable INDEX 1 INTO lw_filetable.
      fname = lw_filetable-filename.
    ENDFORM.                    "call_filedialog
    Reward Points, if useful.
    Regards,
    Manoj Kumar

  • Firefox crashes when the apostrophe and tilde keys are pressed

    Pressing either the apostrophe key or the tilde key is crashing Firefox. It's also happening in other internet browsers and programs (like Skype and Google Talk). I've tried a new keyboard and using different USB ports for it. The first time I tried a new USB port it temporarily fixed the problem, but after restarting my computer for updates the issue returned.
    Firefox, the plugins, add-ons and drivers are all up to date from what I can tell.

    do the crashes occur too when you run firefox in [[Safe Mode]]? (close all firefox windows & press the shift key while launching firefox again)
    probably not related - there's a new version of the flash plugin available. you can install it from [http://get.adobe.com/flashplayer/] (disable the checkbox for bundled software)

  • Xorg shutting down when certain keys are pressed

    Hello after some recent updates, I've experienced that xserver is shutting down and I need to restart my computer to get a working a system back.
    When I hold keys like backspace arrow keys this happens, anyone experienced the same lately?

    (II) config/hal: Adding input device Logitech Logitech BT Mini-Receiver
    (EE) config/hal: NewInputDeviceRequest failed (8)
    (II) config/hal: Adding input device Logitech Logitech BT Mini-Receiver
    (EE) config/hal: NewInputDeviceRequest failed (8)
    (II) config/hal: Adding input device G15 Keyboard G15 Keyboard
    (EE) config/hal: NewInputDeviceRequest failed (8)
    (II) config/hal: Adding input device Gaming Keyboard
    (EE) config/hal: NewInputDeviceRequest failed (8)
    (II) config/hal: Adding input device Gaming Keyboard
    (EE) config/hal: NewInputDeviceRequest failed (8)
    (II) config/hal: Adding input device Logitech USB Gaming Mouse
    (EE) config/hal: NewInputDeviceRequest failed (8)
    (II) config/hal: Adding input device Macintosh mouse button emulation
    (EE) config/hal: NewInputDeviceRequest failed (8)
    I have disabled the hotplugging in my config.

  • Blackberry typing when no keys are pressed

    Hello,
    I have a BB Tour 9630. The problem that I am having is that every 5 seconds the letter "q" is typed on the screen without any buttons being pressed. This happens when I am using the browser, sending a text, trying to place a call and also when the blackberry is just setting on the desk. I have pulled the battery and also reset the blackberry and reloaded the software. Does anyone have any suggestions?
    Thanks,
    Ryan

    Hi and Welcome to the Forums!
    I suggest you contact your service provider for warranty evaluation.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • ITunes stops/starts songs every time certain keys are pressed, whether application is open/active or not.

    iTunes stops/starts songs whenever ENTER,"/" [num pad] or DELETE is pressed, whether the application is open/active or not.  Updated to most recent version a few days ago, though this began seemingly spontaneously today, possibly tied to an iPad sync although I really have no idea how it could have started.

    Hello Brian,
    Thank you for providing the details of the issue you are experiencing with iTunes.
    I recommend reviewing the following article to see if any third-party plug-ins could be causing the problem:
    iTunes: Troubleshooting issues with third-party iTunes plug-ins
    http://support.apple.com/kb/TS3430
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Macbook pro craches when scrolldown buttons are pressed

    Hi everyone.
    I'm experiencing systematic crashes of my macbook pro (10.6.6) each time I do the following:
    - turn on skype camera,
    - click on Spotlight
    - click on Firefox scrolldown buttons (such as bookmarks, ">>" button).
    I've seen some threads about the skype issue. However I my case, the computer crashes, not the app.
    Any idea ?
    Thanks, Nico808

    It may be helpful if you identified the exact MBP model that you have.
    Boot the MBP onto the recovery partition and select from the 4 option menu Disk Utility.  Run Disk utility>First Aid, verify and Repair.
    What is the result?
    Ciao.

  • My numerical keys are not giving me numbers, but instead some are producing the symbols of other keys, e.g. when I press 5 I get [..??

    I accidentally spilt a little bit of water on my keypad yesterday, but I dried it all off straight away and all my keys were working fine.  This morning my number keys suddenly stopped working, I freaked out thinking that it was because of the water yesterday but then I realised that about half an hour before they stopped working, they were working because I used the 1 and 2.  I got the keyboard viewer up to work out which keys were not working, and discovered that the number keys were not producing numbers but other symbols when typed. However now, I don't know whether I have done something else because now I can't even get other symbols when I press keys 1-9!
    I've tried rebooting, and checking all the setting in system preferences.
    Any help would be great!!!

    Hello Rdmusale,
    I understand that some of the keys are not working on your notebook computer, and I would be happy to assist you in this matter!
    To correct the output of characters from your keyboard, I recommend following this document on Notebook Keyboard Troubleshooting (Windows 8). This should help correct how the keys appear on your keyboard.
    Please re-post with the results of your troubleshooting, and I look forward to your reply!
    Regards
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

Maybe you are looking for

  • How to fill BI cube with Web Dynpro ABAP Program UI

    Hello, I am new in web dynpro ABAP and need zour help. How can i write aABAP web dynpro program, which allows the user to enter transactional data and saved in the real time infocube. I know that such a functionality exist  in the integrated planning

  • Receiver MSAccess

    Hi All, My scenario is File to MSAccess. I configured my scenario as per the following blog. /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn I got an error in the communication channel monitoring.

  • In Oracle 10g, iSQL* Plus Application Server is not starting

    I have Windows XP OS, installed Oracle 10g. But Finally OracleOraDb10g_home1iSQL*Plus is not starting. I had looked in windows services OracleOraDb10g_home1iSQL*Plus status is in Starting. Not Starting How to solve this problem, Because two or three

  • Transferring song from iTunes to GarageBand

    How do you transfer a purchased song into the GarageBand application?

  • WLS6.1, Oracle Thin XA, Oracle DB on Solaris = no dice

    I am having the exact same problem. The only hint to an answer I have been able to find in the WL newsgroups is that it may be related to a Solaris Oracle install. ???? BEA... any ideas? me: WLS6.1 on W2000, Oracle 8.1.7 thin driver (tried both with