Skip to content

ShortcutterOptions

ShortcutterOptions = object

Defined in: types.ts:40

optional defaultContext?: string

Defined in: types.ts:49

Context that is active from the start and used when listen() gets none. Defaults to 'default'.


optional ignoreInputs?: 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.


optional mac?: boolean

Defined in: types.ts:58

Treat the platform as macOS (ControlOrMeta = Meta). Detected from navigator by default.


optional preventDefault?: boolean

Defined in: types.ts:56

Call event.preventDefault() when a handler runs. Defaults to false. Can be overridden per shortcut.


optional signal?: AbortSignal

Defined in: types.ts:47

Aborting this signal has the same effect as calling destroy().


optional target?: 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.