tuil
ReferencePackages@mwillbanks/tuil-hotkeysAPI

useHotkey

function exported by @mwillbanks/tuil-hotkeys.

View rawEdit

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

MemberTypeRequiredDescriptionRelated types
keysstringYesSupplies the keys value as string.
handlerHotkeyBinding["handler"]YesSupplies the handler value as HotkeyBinding["handler"].HotkeyBinding
optionsOmit<HotkeyBinding, "keys" | "handler">NoSupplies 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.

Source

View the secondary source reference

Package

@mwillbanks/tuil-hotkeys

On this page