Overview
Keyboard control enables:- Typing text into applications
- Pressing individual keys
- Executing key combinations (Ctrl+C, Alt+Tab, etc.)
- Simulating keyboard shortcuts
Desktop automation requires a template with desktop support. Ensure your sandbox has desktop capabilities enabled.
Typing Text
Type text as if typed on a keyboard:- Python
- JavaScript
Pressing Keys
Press individual keys:- Python
- JavaScript
Key Combinations
Execute key combinations (modifier keys + main key):- Python
- JavaScript
Available Keys
Common key names:- Modifiers:
'ctrl','shift','alt','meta'(Command on macOS) - Function keys:
'F1'through'F12' - Special keys:
'Return'(Enter),'Escape','Tab','Backspace','Delete' - Arrow keys:
'Up','Down','Left','Right' - Letters and numbers:
'a','b','1','2', etc.
Typing Speed
Control typing speed with delay:- Python
- JavaScript
Complete Example
Automate a form filling workflow:- Python
- JavaScript
Common Shortcuts
Common keyboard shortcuts for automation:- Copy:
Ctrl+C(orCmd+Con macOS) - Paste:
Ctrl+V(orCmd+Von macOS) - Cut:
Ctrl+X(orCmd+Xon macOS) - Select All:
Ctrl+A(orCmd+Aon macOS) - Undo:
Ctrl+Z(orCmd+Zon macOS) - Redo:
Ctrl+Y(orCmd+Shift+Zon macOS) - Save:
Ctrl+S(orCmd+Son macOS) - Close Tab:
Ctrl+W(orCmd+Won macOS) - New Tab:
Ctrl+T(orCmd+Ton macOS)
Related
- Mouse Control - Control mouse input
- CLI Reference - Command-line interface for HopX
- Clipboard - Clipboard operations
- X11 Advanced - Advanced keyboard features
- SDK: sandbox.desktop.type() - Python SDK method
Next Steps
- Learn about Mouse Control for clicking and dragging
- Explore Clipboard for copy/paste operations
- Review VNC Server for remote desktop access

