pressKey(key: "Enter")
Returns true if the key press was successful.
key
"a"
, "Enter"
, "F1"
, "Control"
, "Shift+A"
(modifiers are handled by ‘options’ or within the key string for some systems).
For combinations like Ctrl+C, usually use individual presses or type for text.
options
Boolean
scalar type represents true
or false
.