Community
Participate
Working Groups
On windows the first character of a menu item on the menu bar is used as mnemonic, when no mnemonic is specified. This mnemonic is not underlined. SWT suppresses this behavior in Control#WM_SYSCOMMAND, such that in Eclipse the first character is not used as mnemonic. However, this behavior is only suppressed when SWT.KeyDown or SWT.KeyUp is hooked. Therefore, depending on the focus the mnemonic is ignored or not. To test this behavior in Eclipse, add a menu item without a mnemonic (or add a keybinding that suppresses the mnemonic). Then when an empty outline view has focus the first character is enabled, when an text editor has focus the character is disabled. Furthermore, the first character mnemonic is always enabled when pressing Alt followed by <key> (as two key presses).
To test this bug, take the testcase from Bug 346475 Comment 7. Then observe the different behavior when the keylistener is add or not.