TanStack
Hotkeys API Reference

useHotkey

ts
function useHotkey(
   hotkey, 
   callback, 
   options?): void;

Defined in: useHotkey.ts:11

Registers one shortcut. Callback and options are refreshed after every commit.

Parameters

hotkey

RegisterableHotkey

callback

HotkeyCallback

options?

HotkeyOptions

Returns

void