press_key
Send real key events (Enter, Tab, Escape, arrows) to a focused element or selector, triggering framework handlers for shortcuts and navigation.
Instructions
Send a key to the focused element (or to selector, focusing it first) as a real keydown/keypress/keyup sequence, so framework handlers fire. For typing a value use type_text; this is for Enter, Tab, Escape, arrows and shortcuts. Not idempotent: two calls send the key twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | Hold Alt | |
| key | Yes | e.g. "Enter", "Escape", "Tab", "ArrowDown" | |
| ctrl | No | Hold Control | |
| meta | No | Hold Meta (Command/Windows) | |
| shift | No | Hold Shift | |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| frame_id | No | Target iframe id from get_frames; omitted = main frame | |
| selector | No | Target (default: activeElement) |