Community
Participate
Working Groups
Build Identifier: 20110218-0911 When trying to use the on-screen-keyboard of Windows, I noticed that some buttons of this keyboard do not work: the backspace key and the four arrow keys. So, if you want to use the on-screen-keyboard, you should somehow try to avoid these keys (if you can!), because they are not recognized in the Eclipse editor. This is extremely annoying for invalid people, who *must* use the on-screen-keyboard. Reproducible: Always Steps to Reproduce: 1. Open Eclipse 2. Open a random project in Eclipse (eg. Java project) 3. Open the on-screen-keyboard of Windows 4. In the editor, click the Backspace key of the on-screen-keyboard, as well as the four arrow keys - they shouldn't do anything
Hi, the problem with the on-screen-keyboard is still present in the current version (Juno SR1), exactly as described by the previous poster. I know you have other priorities, but please don't leave us "keyboard-challenged" developers hanging :) If someone can give me a few pointers to the right files I could try to develop a patch myself, though I have no eclipse developing experience, and I'm no Java guru either. But I can be quite persistent when tracking a problem. Thanks
Interesting. Ctrl+right/left arrow do work to move forward/backward by a word at a time, and ctrl+shift+right/left arrow do select forward/backward one word, however up/down/left/right arrow and shift+arrow do not work at all. If I run Snippet25 (http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java) then here is what I see for right/left/up/down: DOWN: stateMask=0x80000, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x0, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' DOWN: stateMask=0x80000, keyCode=0x1000003 ARROW_LEFT, character=0x0 '\0' UP : stateMask=0x0, keyCode=0x1000003 ARROW_LEFT, character=0x0 '\0' DOWN: stateMask=0x80000, keyCode=0x1000001 ARROW_UP, character=0x0 '\0' UP : stateMask=0x0, keyCode=0x1000001 ARROW_UP, character=0x0 '\0' DOWN: stateMask=0x80000, keyCode=0x1000002 ARROW_DOWN, character=0x0 '\0' UP : stateMask=0x0, keyCode=0x1000002 ARROW_DOWN, character=0x0 '\0' this is for shift+right/left/up/down: DOWN: stateMask=0x80000, keyCode=0x20000 SHIFT, character=0x0 '\0' location=LEFT DOWN: stateMask=0xa0000 SHIFT, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x20000 SHIFT, character=0x0 '\0' DOWN: stateMask=0x80000, keyCode=0x20000 SHIFT, character=0x0 '\0' location=LEFT DOWN: stateMask=0xa0000 SHIFT, keyCode=0x1000003 ARROW_LEFT, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x1000003 ARROW_LEFT, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x20000 SHIFT, character=0x0 '\0' DOWN: stateMask=0x80000, keyCode=0x20000 SHIFT, character=0x0 '\0' location=LEFT DOWN: stateMask=0xa0000 SHIFT, keyCode=0x1000001 ARROW_UP, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x1000001 ARROW_UP, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x20000 SHIFT, character=0x0 '\0' DOWN: stateMask=0x80000, keyCode=0x20000 SHIFT, character=0x0 '\0' location=LEFT DOWN: stateMask=0xa0000 SHIFT, keyCode=0x1000002 ARROW_DOWN, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x1000002 ARROW_DOWN, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x20000 SHIFT, character=0x0 '\0' and this is for control+right/left/up/down: DOWN: stateMask=0x80000, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0xc0000 CTRL, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0x80000, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0xc0000 CTRL, keyCode=0x1000003 ARROW_LEFT, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x1000003 ARROW_LEFT, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0x80000, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0xc0000 CTRL, keyCode=0x1000001 ARROW_UP, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x1000001 ARROW_UP, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0x80000, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0xc0000 CTRL, keyCode=0x1000002 ARROW_DOWN, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x1000002 ARROW_DOWN, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT
Here's right arrow on a regular keyboard: DOWN: stateMask=0x0, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x0, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' and shift+right on a regular keyboard: DOWN: stateMask=0x0, keyCode=0x20000 SHIFT, character=0x0 '\0' location=LEFT DOWN: stateMask=0x20000 SHIFT, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x20000 SHIFT, keyCode=0x20000 SHIFT, character=0x0 '\0' and control+right on a regular keyboard: DOWN: stateMask=0x0, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT DOWN: stateMask=0x40000 CTRL, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x1000004 ARROW_RIGHT, character=0x0 '\0' UP : stateMask=0x40000 CTRL, keyCode=0x40000 CONTROL, character=0x0 '\0' location=LEFT The state mask for the on-screen keyboard has an extra bit set on key DOWN: 0x80000 I'll have a look at how StyledText is looking at key downs - it may need to mask off that bit. StyledText may already be masking that bit for control + arrows because those are working properly. I'll look at Text, too.
Also interesting: Text works correctly with the on screen keyboard for all forms of arrow keys (with and without modifier keys). However, none of the arrow keys (including ctrl + arrows) work at all in StyledText tab of CustomControlExample. So the Eclipse UI is somehow fixing the problem for control + arrows (it must be overloading the ctrl + arrows handler in order to do camel case traversal).
0x80000 means that the left mouse button was pressed, which makes sense, because that's how the keys of the on-screen keyboard are "typed" - with the mouse. So StyledText needs to mask off the mouse bits in the event stateMask - which it can do with SWT.MODIFIER_MASK. Here's the patch in 4.3 master: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=cbb184ca258eb2b91e7f6fbc3843c3584814607e Tested in CustomControlExample and in Eclipse editor. Tested that "control + left mouse click" still works in Eclipse editor (opens the declaration of the item under the mouse). Are there other mouse + keyboard actions that need testing? SSQ, please review.
Patch looks fine to me.
Carolyn, thanks a lot for the super-quick fix! After some struggling I was even able to recompile the 4.2 maintenance version of the StyledText class with your fix included and now after replacing the StyledText* classes in "plugins/org.eclipse.swt.win32.win32.x86_3.100.1.v4234e.jar" my local 4.2.1 Eclipse installation seems to work fine, too. If it's not too much effort, could you maybe include your fix also in the 4.2 maintenance branch for upcoming maintenance releases? Thanks again, your fix was highly appreciated!
(In reply to comment #7) > If it's not too much effort, could you maybe include your fix also in the > 4.2 maintenance branch for upcoming maintenance releases? SR2 was the last official maintenance release for Juno.
Yes, very sorry. Eclipse 4.2.2 will be officially released tomorrow, but the code has been frozen for a week, so I cannot backport. Nice work replacing the StyledText classes in the jar. You can choose to do the same with 4.2.2, or you can choose to move to 4.3 (Kepler) when it ships in June. Alternatively, you can move to the next Integration build of 4.3 (the fix should be in next Tuesday's I20130226 build), or wait for the Milestone 6 (M6) build of 4.3 on March 15th. Eclipse Integration and Milestone builds are always available from this page: http://download.eclipse.org/eclipse/downloads/
Created attachment 227846 [details] Fixed version of Eclipse Juno 4.2 SR2 SWT plugin (binary) Since the fix for the described problem with the onscreen-keyboard came too late to be backported to the current (and last) Juno stable release (Juno 4.2 SR2), I compiled a patched version of the problematic class (StyledText) and replaced it in the appropriate plugin jar. Usage: To fix the problem in Juno SR2 (released on March 1st 2013), replace the original org.eclipse.swt.win32.win32.x86_3.100.1.v4236b.jar in your eclipse/plugins folder with the one attached.