Mouse & Keyboard Control
Use cliclick tool for mouse/keyboard automation on Mac.
Tools
exec
Use exec to run cliclick commands.
Available Commands
c:X,Y- Click at coordinates X,Yc:~100,~200- Click at relative positionw:500- Wait 500mst:hello- Type "hello"kd:cmd- Key down commandku:cmd- Key up commandp:return- Press return/enterp:space- Press spacep:tab- Press tabm:X,Y- Move mouse to X,Ydp- Double clickrc:X,Y- Right click at X,Y
Common Workflows
Click at position
cliclick c:500,300
Type text
cliclick t:Hello World
Click and type
cliclick c:500,300 && cliclick t:username
Keyboard shortcut
cliclick kd:cmd ku:cmd # Press cmd
Move and click
cliclick m:100,100 && cliclick c:100,100
Getting Coordinates
Use cliclick p to print current mouse position, or use macOS screenshot tool (Shift+Cmd+4) to get coordinates.
Notes
- Coordinates are screen-based (0,0 is top-left)
- Use
osascriptfor more complex keyboard operations - Combine with
sleepfor timing
Scan to contact