Sap Press Key
sap_press_keySend keyboard shortcuts to SAP GUI to trigger transaction actions, navigate screens, or invoke controls, optionally targeting a specific session for parallel automation.
Instructions
Send a keyboard shortcut to SAP
Note on 'Escape': on the desktop backend it sends SAP VKey 12 (F12 / Cancel), not the Windows Esc key; its meaning is screen dependent (some editor screens open an 'Exit editor' dialog). On the WebGUI backend the key is passed to the browser as a normal key press (no VKey mapping). To dismiss a popup use sap_close_popup.
Session parameter:
session=None (default): Uses primary session ("s1")
session="s2": Targets specific session (for parallel agents)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>"
},
"name": "sap_press_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Keyboard shortcut. Use "Ctrl+", "Shift+", "Alt+" prefixes for modifiers. | |
| session | No | Session ID (e.g., "s1", "s2"). None uses primary session. | |
| agent_id | No | Agent identifier for binding check. Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key that was sent | |
| error | No | Error message if success=False | |
| popup | No | Present when a popup dialog is active on screen | |
| success | No | Whether the operation succeeded | |
| page_title | No | Current page title after | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. | |
| status_bar_read | No | Whether status bar was read (only for shortcuts: F-keys, Ctrl+*) | |
| status_bar_type | No | Status bar type if read | |
| status_bar_message | No | Status bar text if read. None if not read, empty string if read but empty. |