pressKey
Press and release a browser key or shortcut on one explicit main-frame target. No held-key sequences or operating-system shortcuts. Sensitive targets are blocked.
API 2.3.3 · Published service contract ↗
Usage
Use the typed read or action tool permitted by the selected Pass documentation. Operation: pressKey. A target tabId is required.
Use sym_pass_docs for the chosen Pass. Only its live supported operations and current capabilityRevision are callable.
Operation arguments
| Field | Type | Required | Description |
|---|---|---|---|
| selector | string | × | |
| ref | string | × | |
| key | string | ✓ | |
| modifiers | array | × | |
| action | string | × | Values: ["press"] |
| workSessionId | string | × |
{
"type": "object",
"properties": {
"selector": {
"type": "string",
"maxLength": 2000
},
"ref": {
"type": "string",
"maxLength": 250
},
"key": {
"type": "string",
"maxLength": 20
},
"modifiers": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Control",
"Shift",
"Alt",
"Meta"
]
},
"maxItems": 4,
"minItems": 1
},
"action": {
"type": "string",
"enum": [
"press"
]
},
"workSessionId": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"key"
],
"additionalProperties": false
}Output
Output is operation- and device-dependent. Read the selected Pass’s current documentation and inspect the returned envelope.