xdotool - automation

Key Combination

xdotool key ctrl+shift+quoteleft
        

Type A String

xdotool type 'python3 watcher.py'
        

Click and Drag

# mousemove args are x, y; mousedown arg is which mousebutton
xdotool mousemove 999 500 && sleep 0.2 && xdotool mousedown 1 && sleep 0.2 && xdotool mousemove 1553 500 && xdotool mouseup 1
        

Get current location of mouse

xdotool getmouselocation --shell
        

Keycodes

Full list

Common codes
Key Code
` quoteleft
Enter Return
Control ctrl
Shift shift
Left Alt Alt_L