eventChord
Function Stability: stable
Normalize a keyboard event to a chord, with the rules of the module doc.
Related guide: Commands and keymap →
Signature
TypeScript
import { eventChord } from '@aionbuilders/nabu/extend';TypeScript
function eventChord(event: Pick<KeyboardEvent, 'key'> & Partial<KeyboardEvent>): Chord | nullParameters
| Parameter | Type | Description |
|---|---|---|
event | Pick<KeyboardEvent, 'key'> & Partial<KeyboardEvent> | n/a |
Returns
Chord | null
null for a pure modifier press, an AltGraph keystroke, or an event with no usable key
Source: src/lib/utils/keys.js:126