-
-
Notifications
You must be signed in to change notification settings - Fork 6
Features Input
coe0718 edited this page May 23, 2026
·
3 revisions
Simulate keyboard and mouse input.
deskbrid input keyboard type "Hello, world!"Protocol:
{"type": "input.keyboard", "action": "type", "text": "Hello, world!"}deskbrid input keyboard key Return
deskbrid input keyboard key Escape
deskbrid input keyboard key F5Protocol:
{"type": "input.keyboard", "action": "key", "key": "Return"}deskbrid combo Ctrl_L+c # Copy
deskbrid combo Ctrl_L+v # Paste
deskbrid combo Super_L+Tab # Alt-tab
deskbrid combo Ctrl_L+Shift_L+Left # Select word leftProtocol:
{"type": "input.keyboard", "action": "combo", "keys": ["Ctrl_L", "c"]}Common keys:
-
Return,Enter- Enter/Return -
Escape,Esc- Escape -
Space- Spacebar -
Tab- Tab -
BackSpace- Backspace -
Delete- Delete -
Insert- Insert -
Home,End,Page_Up,Page_Down -
F1throughF12 -
Shift_L,Shift_R- Shift -
Control_L,Control_R- Ctrl -
Alt_L,Alt_R- Alt -
Super_L,Super_R- Windows key
deskbrid mouse click --button left
deskbrid mouse click --button right
deskbrid mouse click --button middle
deskbrid mouse click --x 100 --y 200Protocol:
{"type": "input.mouse", "action": "click", "x": 100, "y": 200, "button": "left"}deskbrid mouse move --x 500 --y 300Protocol:
{"type": "input.mouse", "action": "move", "x": 500, "y": 300}deskbrid mouse scroll --dy 3 # Scroll up 3 lines
deskbrid mouse scroll --dx -5 # Scroll left
deskbrid mouse scroll --dy 10 # Scroll down 10 linesProtocol:
{"type": "input.mouse", "action": "scroll", "dx": 0, "dy": 3}Under Wayland, input simulation requires:
- ydotoold for keyboard/mouse (X11-style injection)
- graceful fallback - Deskbrid tries ydotool first, falls back to virtual input
Setup:
# Arch
sudo pacman -S ydotool
sudo systemctl enable --now ydotoold
# Debian (may need to build from source)
sudo apt install ydotoolUses xdotool directly:
sudo apt install xdotool # Debian
sudo pacman -S xdotool # Archfrom deskbrid import Deskbrid
client = Deskbrid()
# Navigate in a terminal
client.type_text("cd /home/user/project\n")
client.combo(["Ctrl_L", "c"]) # Copy
# Click a button at coordinates
client.mouse_click(x=500, y=300, button="left")
# Scroll down
client.mouse_scroll(dy=5)→ {"type": "input.keyboard", "action": "type", "text": "npm test\n"}
← {"type": "response", "status": "ok"}
→ {"type": "input.keyboard", "action": "combo", "keys": ["Alt_L", "F4"]}
← {"type": "response", "status": "ok"}- Accessibility
- Apps
- Audio
- Backlight (LED driver)
- Bluetooth
- Clipboard
- Color Picker
- Desktop Portal
- Desktop Settings
- Files
- Hotkeys
- Input
- Keyboard Layouts
- Media (MPRIS)
- Monitors
- Network
- Notifications
- Print (CUPS)
- Screenshots
- Screen Recording
- Screencast
- Self-Update
- System
- System Tray
- Systemd Units & Timers
- Terminals (PTY)
- Windows & Workspaces