ShortcutterOptions
ShortcutterOptions =
object
Defined in: types.ts:40
Properties
Section titled “Properties”defaultContext?
Section titled “defaultContext?”
optionaldefaultContext?:string
Defined in: types.ts:49
Context that is active from the start and used when listen() gets none. Defaults to 'default'.
ignoreInputs?
Section titled “ignoreInputs?”
optionalignoreInputs?:boolean
Defined in: types.ts:54
Skip handlers while typing in <input>, <textarea>, <select>, a contenteditable element,
or during IME composition. Defaults to true. Can be overridden per shortcut.
optionalmac?:boolean
Defined in: types.ts:58
Treat the platform as macOS (ControlOrMeta = Meta). Detected from navigator by default.
preventDefault?
Section titled “preventDefault?”
optionalpreventDefault?:boolean
Defined in: types.ts:56
Call event.preventDefault() when a handler runs. Defaults to false. Can be overridden per shortcut.
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: types.ts:47
Aborting this signal has the same effect as calling destroy().
target?
Section titled “target?”
optionaltarget?:EventTarget
Defined in: types.ts:45
Where keyboard events are listened to. Defaults to window in browsers.
Without a target (e.g. during SSR) no listeners are attached and no shortcut fires.