useHotkey
function exported by @mwillbanks/tuil-hotkeys.
function
Public function exported by @mwillbanks/tuil-hotkeys.
export function useHotkey(
keys: string,
handler: HotkeyBinding["handler"],
options: Omit<HotkeyBinding, "keys" | "handler"> = {},
): void;Members
This declaration has no public members.
Parameters
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
keys | string | Yes | Supplies the keys value as string. | — |
handler | HotkeyBinding["handler"] | Yes | Supplies the handler value as HotkeyBinding["handler"]. | HotkeyBinding |
options | Omit<HotkeyBinding, "keys" | "handler"> | No | Supplies the options value as Omit<HotkeyBinding, "keys" | "handler">. | HotkeyBinding |
Returns
void — Returns a value that satisfies void.
Related types: —
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference