Community
Participate
Working Groups
F3 A snippet is included below that simply listens for key presses and prints the respective keyCode and state for each. When it's run on any platform other than hpux its values for Shift+F10 are: Key Pressed: 16777235. State: 131072 However on hpux pressing Shift+F10 gives: Key Pressed: 0. State: 131072 This causes an accessibility problem in Eclipse because Shift+F10 is used to display the context menu for the currently selected item. It might be another problem case in Widget.setKeyState().
Can I get the code snippet, Thanks!
Sorry, I forgot... import org.eclipse.swt.events.*; import org.eclipse.swt.widgets.*; public class KeysShow { public static void main(String[] args) { Shell shell = new Shell(); shell.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { System.out.print("Key Pressed: " + e.keyCode); System.out.println(". State: " + e.stateMask); } }); shell.open(); Display display = Display.getDefault(); while (!shell.isDisposed()) if (!display.readAndDispatch()) display.sleep(); shell.dispose(); } }
Please investigate status of this report.
post-2.0 bug cleanup note: still happens. The problem is that XLookupString is answering a strange keysym for Shift+F10 (and also Shift+F9, Shift+F11, Shift+12). We may need to add special cases to Widget.setKeyState(), but should first see if this is documented anywhere.
Fixed, used same approach as on Solaris to fix F11 and F12 mappings
Note that the keysyms originally answered by XLookupString correspond to Keypad+F1-Keypad+F4.