You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the KeyCode.SHORTCUT constant doesn't work for adding keyboard shortcuts with the Command key.
The same issue was reported in codecentric#42 .
The shortcut key is a virtual key that is used to represent different keys on different platforms (in order to create platform-independent keyboard shortcuts). Here's a part of the Javadoc for KeyCombination:
/** * ... * The {@code shortcut} modifier is used to represent the modifier key which is * used commonly in keyboard shortcuts on the host platform. This is for * example {@code control} on Windows and {@code meta} (command key) on Mac. * By using {@code shortcut} key modifier developers can create platform * independent shortcuts. So the "Shortcut+C" key combination is handled * internally as "Ctrl+C" on Windows and "Meta+C" on Mac. * ... */
The text was updated successfully, but these errors were encountered:
jkaving
added a commit
to jkaving/NSMenuFX
that referenced
this issue
Nov 18, 2022
KeyCombination.shortcut is a way to add platform-independent keyboard
shortcuts that will e.g. use "Ctrl" on Windows and "Cmd" on macOS
(see the Javadoc in javafx.scene.input.KeyCombination).
This commit just adds a check for getShortcut() and sets the
NSEventModifierFlagCommand just like is already done for getMeta().
Fixes0x4a616e#24
Using the
KeyCode.SHORTCUT
constant doesn't work for adding keyboard shortcuts with the Command key.The same issue was reported in codecentric#42 .
The shortcut key is a virtual key that is used to represent different keys on different platforms (in order to create platform-independent keyboard shortcuts). Here's a part of the Javadoc for
KeyCombination
:The text was updated successfully, but these errors were encountered: