Summary: | [KeyBindings] Rethink mnemonic and keybinding conflicts | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Rolf Theunissen <rolf.theunissen> |
Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | tom.schindl, wim.jongman |
Version: | 4.18 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 10 | ||
See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=570722 | ||
Whiteboard: | |||
Bug Depends on: | 346475 | ||
Bug Blocks: |
Description
Rolf Theunissen
2021-01-29 14:14:49 EST
Lets add some more complexity: On windows: 1) There is an option to always show mnemonics, so showing a disabled mnemonic could add confusion [1] 2) When no mnemonic is specified, the first character is used as mnemonic. This mnemonic is not highlighted (in Eclipse). This seems to be default behavior in Windows, though I have not found any reference for this yet. To test the 2nd point, with the Emacs bindings, close all editors and select the outline. Push Alt+W, and the windows menu shows up. In general, can be tested by pressing Alt then typing the first character of a menu without mnemonic. It seems that when a mnemonic is defined for a character it takes precedence over the first character. And now the fun starts: Define a binding for Alt+a, this will remove the mnemonic from the Search menu. - With all editors closed; Alt+S opens the search menu. - Open a Java editor, the Source menu with S-mnemonic is added; Alt+S doesn't open any menu (Same with the text editor, but that doesn't add a (visible) source menu) - Close the editor; Alt+S doesn't open any menu - Select the outline editor; Alt+S opens the Search menu This behavior is probably some kind of bug So in general, disabling the (default) mnemonics on windows will enable the first character as mnemonic (though this one will not be underlined) [1] https://docs.microsoft.com/en-us/previous-versions/windows/desktop/dnacc/guidelines-for-keyboard-user-interface-design#underlining-access-keys I think it is gernally wrong (at least discouraged) to put a keybinding to Alt+<Key> in a windows env, not? (In reply to Thomas Schindl from comment #2) > I think it is gernally wrong (at least discouraged) to put a keybinding to > Alt+<Key> in a windows env, not? It is indeed discouraged to have a keybinding on Alt+<Key> in Windows, due to interactions with the mnemonics. However the Emacs KeyBindings by default use them, otherwise they wouldn't be mimicking Emacs. The behavior that the first character becomes the mnemonic (Comment 1) is supposed to be suppressed by Eclipse. However this behavior is flaky, see Bug 346475 and Bug 570998. |