Version: 1.9.1
run-shortcut is a bash-based utility designed to handle keyboard and mouse automation across X11 and Wayland (Pop!_OS). It manages xdotool and ydotool backends automatically and provides a floating, balanced OSD for visual feedback.
Ensure these system packages are present for full functionality.
xdotool: Backend for X11 environments.ydotool: Backend for Wayland environments (Mutter/GNOME).bash: The engine itself (v4.0+).
osd_cat(xosd-bin): Provides the floating Cyan HUD.libinput-tools: Required for the--recordhardware click capture.xrandr: Used to probe screen dimensions for Smart HUD placement.wlrctl: (Optional) Helper for absolute coordinate resolution on Wayland.
sudo apt update && sudo apt install xdotool ydotool xosd-bin libinput-tools xrandr wlrctl
To install the binary globally and configure hardware permissions:
- Run the Installer:
./run-shortcut --install
- Permissions & Reboot: The installer adds your user to the
inputgroup and sets audevrule for/dev/uinput. A full reboot is required for these hardware permissions to take effect. - Daemon Check: Wayland users require
ydotooldto be running. The script attempts to start it automatically, but you can verify it manually:
pgrep -x ydotoold || ydotoold &
Note: If you edit the script in your dev folder, run ./run-shortcut --reinstall to sync changes to /usr/local/bin.
Instead of manual coordinate hunting, use the hardware recorder:
run-shortcut --osd --record
- Click your target on the screen.
- Terminal Output: The terminal will print the exact
run-shortcutcommand. - HUD Feedback: The OSD will flash the captured
X, Ycoordinates in real-time.
run-shortcut --osd "ctrl alt t"
run-shortcut --osd -m 1125 894 -c 1 -d 500 "Action Label"
run-shortcut --make-launcher "My Macro" "--osd -d 500" "alt o"
- Launcher:
~/.local/share/applications/rs-my-macro.desktop - Wrapper:
~/.local/bin/rs-wrap-my-macro
| Flag | Function |
|---|---|
--install |
Sets binary and udev rules. |
--reinstall |
Wipes and rebuilds from local source. |
--record |
Starts libinput click capture. |
--make-launcher |
Generates a .desktop file and shell wrapper. |
--remove-launcher |
Deletes a managed shortcut by ID. |
--osd |
Shows the floating cyan HUD (Bottom-Left). |
--color |
Overrides HUD color (e.g., --color "green"). |
.debPackaging: Create a native Debian package to automate dependency checks andudevrule installation.install.shWrapper: A one-click installer for fresh workstations that handles user group assignments.- Systemd Integration: Move
ydotooldmanagement into a user-level Systemd service for better reliability on Wayland.
- Sequence Recorder: Update
--recordto capture multiple clicks and export them as a single.shmacro. - Pixel-Search Triggers: Integrate basic image-recognition to wait for specific UI elements before firing.
- Interactive HUD: Add "Dismiss" or "Cancel" functionality via OSD buttons.
- Android Bridge: Use the Kapcode Macro Controller Android app to trigger PC macros over the local network.
- Centralized Repo: Move all custom macros into
/etc/kapcode/macrosfor system-wide access.
Kapcode Software Repository | 2026