Files
BrowserSkill/crates/bsk-protocol/schema/tool_press_params.json
2026-06-22 17:36:26 +08:00

77 lines
1.7 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PressParams",
"type": "object",
"required": [
"key",
"session_id"
],
"properties": {
"hold_ms": {
"description": "Hold the key down for this many milliseconds between `keyDown` and `keyUp`. Useful for testing long-press handlers.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"key": {
"description": "Logical key name. Accepts CDP `key` strings (`Enter`, `Escape`, `ArrowDown`, single characters like `a`), or a compound expression such as `Ctrl+A` / `Meta+Shift+P`. Modifiers in the compound form combine with anything supplied via `modifiers`.",
"type": "string"
},
"modifiers": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/KeyModifier"
}
},
"ref": {
"description": "Optional target to focus before dispatching the key.",
"type": [
"string",
"null"
]
},
"selector": {
"type": [
"string",
"null"
]
},
"session_id": {
"type": "string"
},
"tab_id": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"timeout_ms": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 1.0
}
},
"definitions": {
"KeyModifier": {
"description": "Keyboard modifier flags. Multiple flags may be combined; the extension folds them into CDP's bitfield (`alt=1, ctrl=2, meta=4, shift=8`).",
"type": "string",
"enum": [
"alt",
"ctrl",
"meta",
"shift"
]
}
}
}