Win Key Press
Win Key Press
Section titled “Win Key Press”Type: win-key-press · Package: Desktop Activities v1.0.0
Send a key or combination to the app: shortcuts like ctrl+s (save), alt+f4 (close), f5 (refresh), or keys like enter and tab. Essential for operating desktop apps that depend on keyboard shortcuts.
How it works
Section titled “How it works”If you indicate a selector, first focus that element and then send the key(s); if you omit it, the keys go to the active session window. Combinations are written with + (e.g. ctrl+shift+n).
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
keys | expression | Key or combination. Ex: ctrl+s, alt+f4, enter, f5, ctrl+shift+n. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | Win Attach session. If omitted, the selector must include the window. |
selector | selector | Element to focus before sending the key. Optional. |
timeout | number | Maximum ms to wait for the element (if there is a selector). By default 30000. |
Example
Section titled “Example”Save with Ctrl+S and confirm a dialog with Enter:
Win Key Press keys = "ctrl+s"Win Wait For selector = (diálogo "Confirmar") state = visibleWin Key Press keys = "enter"