webpage_press_key
Press a key in the device browser — works on BOTH iOS Safari and Android Chrome, and on both the key is real: Android dispatches a trusted browser-level keyDown/keyUp pair, and iOS presses it on the device hardware-keyboard surface, which DOES move focus (Tab moves through the form) and reaches key handlers. Where the hardware surface is unavailable, iOS falls back to a synthesized isTrusted:false KeyboardEvent on document.activeElement that does NOT move focus, and for Enter inside a also calls form.requestSubmit()/submit() so submission still fires. The response reports which was used via via.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key to press | |
| udid | Yes | Device UDID / serial (iOS or Android) | |
| pageId | No | Target page/tab id — auto-picked when omitted | |
| socket | No | Android only: abstract unix socket name (default: chrome_devtools_remote) | |
| platformVersion | No | Ignored (kept for compatibility) |