use-keybinds
Version:
Lightweight keybind library for React
15 lines (12 loc) • 509 B
TypeScript
import React, { ReactNode } from 'react';
import { Keybinds } from './types.js';
declare const KeybindsContext: React.Context<{
keybinds: Keybinds<string>;
combinationsToKeybindKey: Record<string, string>;
}>;
interface KeybindsProviderProps<Slug extends string> {
children: ReactNode;
keybinds: Keybinds<Slug>;
}
declare const KeybindsProvider: <Slug extends string>(props: KeybindsProviderProps<Slug>) => React.JSX.Element;
export { KeybindsContext, KeybindsProvider as default };