dir-sim-keypress
Action
Simulates a keyboard event for testing keyboard interactions
Syntax
dir-sim-keypress "Enter"
simulate pressing a key (Enter, Escape, Tab, a, b, etc.)
dir-sim-keypress "Enter" on "#input-field"
simulate key press on element matching CSS selector
dir-sim-keypress "s" ctrl
simulate key press with Ctrl modifier
dir-sim-keypress "a" shift
simulate key press with Shift modifier
dir-sim-keypress "Tab" alt
simulate key press with Alt modifier
dir-sim-keypress "b" cmd
simulate key press with Cmd/Meta modifier