import { HandlerFn, ShortcutOptions } from "./types"; export declare class Keystrok { private registry; private scopeManager; private sequenceMatcher; private listening; private boundOnKeydown; private boundOnKeyup; constructor(); /** * Bind a shortcut to a handler. * * @param shortcut - A shortcut string ("ctrl+k") or a sequence (["g", "b"]) * @param handler - The function to call when the shortcut fires * @param options - Optional scope, event type, preventDefault, once * * @example * keystrok.bind('ctrl+k', () => openSearch()) * keystrok.bind(['g', 'b'], () => goBack()) * keystrok.bind('ctrl+s', save, { preventDefault: true }) */ bind(shortcut: string | string[], handler: HandlerFn, options?: ShortcutOptions): this; /** * Unbind a shortcut. * * @example * keystrok.unbind('ctrl+k') */ unbind(shortcut: string | string[]): this; /** * Manage scopes. * * @example * keystrok.scope('editor').activate() * keystrok.scope('modal').override() * keystrok.scope('editor').deactivate() */ scope(name: string): { activate: () => Keystrok; deactivate: () => Keystrok; override: () => Keystrok; isActive: () => boolean; }; /** * Remove all bindings and stop listening to keyboard events. */ destroy(): void; /** * Start listening to keyboard events. * Called automatically on construction. */ start(): void; /** * Stop listening to keyboard events without removing bindings. */ stop(): void; private handleEvent; } /** * Creates a new isolated Keystrok instance. * Useful for testing or when you need multiple independent instances. */ export declare function createKeystrok(): Keystrok; /** * The default singleton instance. * Import and use this directly in most cases. */ export declare const keystrok: Keystrok; //# sourceMappingURL=keystrok.d.ts.map