Interface: KeyBinding<S, C>
Defined in: modal/keys.ts:72
Type Parameters
S
S
C
C
Properties
down?
optionaldown?: (state,key,repeat) =>KeyClaim<C>
Defined in: modal/keys.ts:76
Answer for keydown; omitted = "pass". Receives the matched key and the repeat flag.
Parameters
state
S
key
string
repeat
boolean
Returns
KeyClaim<C>
hint?
Defined in: modal/keys.ts:86
Display metadata for cheat sheets and help (keyHints) — declared on the binding itself, so what the UI shows can never drift from what the key does. The function form lets a state-dependent binding describe itself per state (Enter: "send" vs "done editing"); returning undefined hides the binding in that state.
keys
keys: readonly
string[]
Defined in: modal/keys.ts:74
KeyboardEvent.key values this binding matches, exactly (list both cases for letters).
up?
optionalup?: (state,key) =>KeyClaim<C>
Defined in: modal/keys.ts:78
Answer for keyup; omitted = "pass".
Parameters
state
S
key
string
Returns
KeyClaim<C>