UNPKG

reakeys

Version:
15 lines (14 loc) 456 B
import { RefObject } from 'react'; import type { Callback } from 'ctrl-keys'; export interface HotkeyShortcuts { name: string; keys: string | string[]; ref?: RefObject<HTMLElement | null>; disabled?: boolean; callback: Callback; action?: 'keypress' | 'keydown' | 'keyup'; description?: string; category?: string; hidden?: boolean; } export declare const useHotkeys: (shortcuts?: HotkeyShortcuts[]) => HotkeyShortcuts[];