Dispatches a single keydown+keyup for a named key. Useful for submitting forms (Enter), dismissing dialogs (Escape), navigating selects (ArrowDown), or triggering shortcuts (Control+A).
Either a single printable character (e.g. a, 1, !) or one of the special keys:Enter, Tab, Escape, Backspace, Delete, Space, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, F1–F12.Unknown names return 400.
No auto-submit.press: Enter dispatches the key; any resulting form submission or navigation is the page’s doing. Wait for page state separately if you need confirmation.
Chord syntax is key + holdKeys[], not a single string. Consistent with /mouse/click.
Holding keys across multiple presses requires calling press for each key; modifier state is released after each call.
The following Ctrl/Meta chords execute their editor command in addition to firing the keydown/keyup events, so you can select, copy, paste, and undo in text fields just like a user would:
Chord
Action
Ctrl/Meta + A
Select all
Ctrl/Meta + C
Copy selection
Ctrl/Meta + X
Cut selection
Ctrl/Meta + V
Paste
Ctrl/Meta + Z
Undo
Ctrl/Meta + Shift + Z
Redo
Ctrl/Meta + Y
Redo (Windows-style)
Other Ctrl/Meta chords still dispatch the keydown event with the modifier set (page listeners see ctrlKey: true) but don’t trigger browser-chrome accelerators like new-tab or close-tab.