React Hookers - v6.3.0
    Preparing search index...

    Interface KeyboardShortcutProps

    Props for the useKeyboardShortcut hook.

    interface KeyboardShortcutProps {
        containerRef?: RefObject<Element | null>;
        isDisabled?: boolean;
        onAction?: () => void;
        shortcut: readonly (number | KeyCode | "Ctrl" | string & {})[];
    }
    Index

    Properties

    containerRef?: RefObject<Element | null>

    A container within which a shortcut is active. By default, shortcuts are document-wide.

    isDisabled?: boolean

    If true, the shortcut is not captured.

    false
    
    onAction?: () => void

    A handler that is called when all keys in shortcut are pressed.

    shortcut: readonly (number | KeyCode | "Ctrl" | string & {})[]

    Keys that must be pressed simultaneously to trigger the action.