constglobalShortcut:object
Defined in: global-shortcut.ts:56
isRegistered: (
id) =>Promise<boolean>
Whether a shortcut with this id is currently registered.
string
Promise<boolean>
onShortcut: (
handler) =>Promise<() =>Promise<void>>
Listens to global shortcut activations. The handler receives the shortcut
id registered via registerShortcut.
(event) => void
Promise<() => Promise<void>>
register: (
id,accelerator) =>Promise<boolean> =registerShortcut
Registers a global hotkey. Accelerator format: Cmd+Shift+K, Ctrl+Alt+1,
F5, etc. Returns whether the OS accepted the registration.
string
string
Promise<boolean>
registerAll: (
entries) =>Promise<boolean[]>
Registers a batch of hotkeys in one call (upstream registerAll).
Returns per-entry success flags, in order.
object[]
Promise<boolean[]>
unregister: (
id) =>Promise<boolean> =unregisterShortcut
Unregisters a previously registered hotkey by id.
string
Promise<boolean>
unregisterAll: () =>
Promise<boolean>
Unregisters every hotkey registered by this process (upstream name).
Promise<boolean>
isRegistered(
id):Promise<boolean>
Defined in: global-shortcut.ts:40
Whether a shortcut with this id is currently registered.
string
Promise<boolean>
onShortcut(
handler):Promise<() =>Promise<void>>
Defined in: global-shortcut.ts:48
Listens to global shortcut activations. The handler receives the shortcut
id registered via registerShortcut.
(event) => void
Promise<() => Promise<void>>
registerAll(
entries):Promise<boolean[]>
Defined in: global-shortcut.ts:28
Registers a batch of hotkeys in one call (upstream registerAll).
Returns per-entry success flags, in order.
object[]
Promise<boolean[]>
registerShortcut(
id,accelerator):Promise<boolean>
Defined in: global-shortcut.ts:12
Registers a global hotkey. Accelerator format: Cmd+Shift+K, Ctrl+Alt+1,
F5, etc. Returns whether the OS accepted the registration.
string
string
Promise<boolean>
unregisterAll():
Promise<boolean>
Defined in: global-shortcut.ts:35
Unregisters every hotkey registered by this process (upstream name).
Promise<boolean>
unregisterShortcut(
id):Promise<boolean>
Defined in: global-shortcut.ts:20
Unregisters a previously registered hotkey by id.
string
Promise<boolean>