press_key
Sends a real key press or combo to the focused element so you can submit forms with Enter, close dialogs with Escape, move with Tab, or run shortcuts like Control+c.
Instructions
Send a real key press (or combination) to whatever element currently has focus: submit with Enter, close dialogs with Escape, move with Tab or the arrow keys, or use shortcuts such as Control+a, Control+c, Control+v. Focus first with click or type if needed. To enter text use type instead; to set form fields use fill_form. Returns the key and repeat count; page changes are not reported, so snapshot afterwards. An unrecognised key name returns an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | Tab id from tabs_list. Defaults to the current tab. | |
| keys | Yes | One key or a '+'-joined combo, e.g. Enter, Escape, Tab, ArrowDown, PageDown, a, Control+a, Meta+Shift+k. Modifiers: Control, Shift, Alt, Meta. | |
| repeat | No | Times to press the key (default 1). |