Skip to main content

HotkeyProviderProps

All options regarding an entire hotkey scope

type HotkeyProviderProps = {
sequenceTimeout?: number;
chordTimeout?: number;
sequenceDelimiter?: string;
chordDelimiter?: string;
customSymbolMap?: Partial<Record<PrimaryKeyCode, string>>;
};

Attributes

sequenceTimeout

defaults to 400

sequenceTimeout: number;

Defines how many milliseconds can pass between two key presses in a sequence hotkey

chordTimeout

defaults to 100

chordTimeout: number;

Defines how many milliseconds can pass from pressing a primary key until all required modifier keys are also pressed in a chord hotkey

sequenceDelimiter

defaults to ">"

sequenceDelimiter: string;

Defines what string will be used in stringified sequence hotkeys

chordDelimiter

defaults to "+"

chordDelimiter: string;

Defines what string will be used in stringified chord hotkeys

customSymbolMap

defaults to undefined

customSymbolMap: Partial<Record<PrimaryKeyCode, string>>;

Defines custom key code mappings for text representation of hotkey for alternative keyboard layouts. (e.g. German: KeyY -> Z)