1 | import * as React from "react";
|
2 | import { HotkeyConfig } from "./hotkeyConfig";
|
3 | export interface UseHotkeysOptions {
|
4 | /**
|
5 | * The key combo which will trigger the hotkeys dialog to open.
|
6 | *
|
7 | * @default "?"
|
8 | */
|
9 | showDialogKeyCombo?: string;
|
10 | }
|
11 | export interface UseHotkeysReturnValue {
|
12 | handleKeyDown: React.KeyboardEventHandler<HTMLElement>;
|
13 | handleKeyUp: React.KeyboardEventHandler<HTMLElement>;
|
14 | }
|
15 | /**
|
16 | * React hook to register global and local hotkeys for a component.
|
17 | *
|
18 | * @param keys list of hotkeys to configure
|
19 | * @param options hook options
|
20 | */
|
21 | export declare function useHotkeys(keys: HotkeyConfig[], options?: UseHotkeysOptions): UseHotkeysReturnValue;
|