press_key
Send keyboard key presses or shortcuts, optionally focusing a page element first using a selector or ref to trigger actions like Enter, Tab, or Ctrl+K.
Instructions
Press a keyboard key or shortcut. Optionally focus an element first via ref/selector. Use for Enter, Escape, Tab, arrows, shortcuts (Ctrl+K).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key to press — e.g. 'Enter', 'Escape', 'Tab', 'a', 'ArrowDown', 'F1'. For printable characters use the character itself. | |
| ref | No | Element ref to focus before pressing key (e.g. 'e5') | |
| selector | No | CSS selector to focus before pressing key (e.g. '#search-input') | |
| modifiers | No | Modifier keys to hold during key press (e.g. ['ctrl', 'shift'] for Ctrl+Shift+key) |