Currently the shortcut is triggered either by non-modifier key-up or key-down event and additional matching is done by checking the modifier flags. It does not handle modifier-only shortcuts.
Terminology
Shortcut Sequence: sequence of key-down and key-up events from the first key-down through the last key-up
Non-Modifier Key: any other key than NSEvent.ModifierFlags
Modifier Key: any of the NSEvent.ModifierFlags keys
Active Modifier Keys: modifier keys as reported by NSEvent.modifierFlags
Shortcut Sequence Modifier Keys: modifier keys that were pressed within Shortcut Sequence but are currently up
Required Modifier Keys: modifier keys required by the shortcut
Triggering Policies
In examples bellow underscore highlights modifier key events recognized by the policy. bold highlights the key event that triggered policy recognition. strikethrough highlights keys that are ignored by the policy.
Triggered by Non-Modifier Key Down / Up
Triggered by Modifier Key Down
Triggered by Modifier Key Up
Testimonials
@bryanforbes needs to globally handle an exact match of a modifier-only shortcut for both key down and key up.
Currently the shortcut is triggered either by non-modifier key-up or key-down event and additional matching is done by checking the modifier flags. It does not handle modifier-only shortcuts.
Terminology
Shortcut Sequence: sequence of
key-downandkey-upevents from the firstkey-downthrough the lastkey-upNon-Modifier Key: any other key than
NSEvent.ModifierFlagsModifier Key: any of the
NSEvent.ModifierFlagskeysActive Modifier Keys: modifier keys as reported by
NSEvent.modifierFlagsShortcut Sequence Modifier Keys: modifier keys that were pressed within Shortcut Sequence but are currently up
Required Modifier Keys: modifier keys required by the shortcut
Triggering Policies
In examples bellow
underscorehighlights modifier key events recognized by the policy.boldhighlights the key event that triggered policy recognition.highlights keys that are ignored by the policy.strikethroughTriggered by Non-Modifier Key Down / Up
shift-a:shift-down-a-down/a-upshift-a:shift-down--ctrl-downa-down/a-upTriggered by Modifier Key Down
ctrl-shift:ctrl-down-shift-downctrl-shift:ctrl-down--cmd-downshift-downTriggered by Modifier Key Up
cmd-ctrl-shift:cmd-down-ctrl-down-shift-down-ctrl-upcmd-ctrl-shift:cmd-down-ctrl-down-cmd-up-shift-down-shift-up-ctrl-upcmd-ctrl-shift:cmd-down-ctrl-down--opt-downshift-down-ctrl-upcmd-ctrl-shift:cmd-down-ctrl-down-opt-down-cmd-up-shift-down--opt-upshift-up-ctrl-upTestimonials
@bryanforbes needs to globally handle an exact match of a modifier-only shortcut for both key down and key up.