DropletKeyboardShortcut
A key equivalent, as the user recorded it.
struct DropletKeyboardShortcut
Initializers
init(from:)
init(from decoder: any Decoder) throws
init(keyCode:modifiers:)
init(keyCode: UInt16, modifiers: UInt)
Properties
keyCode
let keyCode: UInt16
Virtual key code.
modifiers
let modifiers: UInt
Modifier mask, as NSEvent.ModifierFlags.rawValue.
Build it from AppKit, not from Carbon: NSEvent.ModifierFlags([.control, .option, .command]).rawValue. The host stores this straight into its own SavedShortcut and reads it back with NSEvent.ModifierFlags(rawValue:), so a Carbon mask (controlKey, optionKey, …) resolves to different flags — usually to none at all, which binds the bare key and swallows it system-wide.