package.dist.validators.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react-hotkeys-hook Show documentation
Show all versions of react-hotkeys-hook Show documentation
React hook for handling keyboard shortcuts
The newest version!
import { FormTags, Hotkey, Scopes, Trigger } from './types';
export declare function maybePreventDefault(e: KeyboardEvent, hotkey: Hotkey, preventDefault?: Trigger): void;
export declare function isHotkeyEnabled(e: KeyboardEvent, hotkey: Hotkey, enabled?: Trigger): boolean;
export declare function isKeyboardEventTriggeredByInput(ev: KeyboardEvent): boolean;
export declare function isHotkeyEnabledOnTag({ target }: KeyboardEvent, enabledOnTags?: readonly FormTags[] | boolean): boolean;
export declare function isScopeActive(activeScopes: string[], scopes?: Scopes): boolean;
export declare const isHotkeyMatchingKeyboardEvent: (e: KeyboardEvent, hotkey: Hotkey, ignoreModifiers?: boolean) => boolean;