testdriver/press-keys.yaml
Description
Thepress-keys
command is used to simulate typing a keyboard combination. This is useful for triggering shortcuts or interacting with applications via keyboard input.
Arguments
Argument | Type | Description |
---|---|---|
keys | YAML sequence of strings | A list of keys to press together. |
The keys supported are the standard Windows keys. Supported values:
ctrl
,shift
,alt
,command
,option
,win
- Left/right variants:
ctrlleft
,ctrlright
,shiftleft
,shiftright
,altleft
,altright
,optionleft
,optionright
,winleft
,winright
Example usage
Protips
- Use this command to trigger system-wide or application-specific shortcuts, such as the Start menu or the browser elements.
- Ensure the application or system is in focus when using this command to avoid unexpected behavior.
Notes
- The
press-keys
command is ideal for automating workflows that rely on keyboard shortcuts.