Trusted Press Key
trusted_press_keyPress real key events or shortcuts in Arc to submit forms, move focus, and close dialogs; optionally focus a selector first and report the focused element.
Instructions
Press a key or shortcut with real key events: Enter really submits a form, Tab really moves focus, Escape closes what it closes. Accepts names (Enter, Tab, Escape, ArrowDown, F5), single characters, and modifier combinations such as Meta+A, Meta+C, Shift+Tab, Control+Shift+K. Needs the DevTools engine. Meta is Command; on macOS the editing shortcuts (Meta+A, C, V, X, Z) work because the matching editing command is sent with them. Optionally focuses a selector first. Reports the element that has focus afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key or combination, for example Enter, Tab, ArrowDown, Meta+A, Shift+Tab | |
| nth | No | Which match to act on when several exist, 0-based | |
| exact | No | For "text=", "label=" and "placeholder=" selectors, require the whole trimmed text to equal the label. No effect on CSS, ref= or role= selectors. | |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first. | |
| selector | No | Focus this element first. CSS selector, "text=Label", or ref=, role=, label=, placeholder= as in click. Omit to press into whatever has focus. |