UNPKG

shortcutter

Version:

Tiny, dependency-free library to manage keyboard shortcuts in your application.

10 lines (9 loc) 452 B
import { PHASES } from './types'; export declare function createContext(contextName: string): { add: (shortcut: string[], callback: (event: Event, phase: PHASES) => void, phases?: PHASES) => void; get(shortcut: string[], phase: PHASES): ((event: Event, phase: PHASES) => void) | undefined; has(shortcut: string[], phase: PHASES): boolean; remove(shortcut: string[], phases?: PHASES): void; getAll(): string[]; clear(): void; };