Simulate Key Press

Action keyboard.badge.ellipsis

action.simulate_keys

Simulate a keyboard shortcut on macOS. The key combination is recorded using a hotkey recorder in the inspector and played back via CGEvent when the node executes. This allows workflows to control other applications by sending keystrokes.

Requires Accessibility permissions to be granted to Watchflows in System Settings.

Destructive action

Synthetic keystrokes go to whichever application has keyboard focus at the moment the workflow fires — that means a configured Cmd+Q can quit any frontmost app, Cmd+W can close a critical document, and Cmd+Shift+Delete can empty the Trash. Watchflows surfaces an inline warning when the configured shortcut matches a known destructive combination. Workflows configured this way prompt for confirmation on every arm.

Ports

DirectionNameData TypeDescription
InputInputAnyIncoming payload
OutputOutputAnyPassthrough after keystroke

Configuration

FieldTypeDefaultDescription
shortcutHotkey RecorderClick to record the keyboard shortcut to simulate

Output Variables

VariableTypeDescription
pressedBooleanWhether the key press was simulated
shortcutStringHuman-readable key combo that was pressed

Example

Toggle Do Not Disturb with a keyboard shortcut trigger: