This repository is a Rust fork of the original Spammy project at https://github.com/FrostAtom/spammy.
It is written in Rust and built for X11 on Linux, with a native egui UI.
-
Spammy keys (orange)
- Left-click a key in the UI to mark it as Spammy
- When the app is enabled and the physical key is held down, the key repeats automatically
- Useful for held actions in games or apps where repeated press behavior is desired
-
Speedy keys (yellow)
- Right-click a key in the UI to mark it as Speedy
- When the key is pressed, the app sends a single fast tap
- Useful for quick one-shot actions instead of holding the key down
-
Normal keys (gray)
- No special automation
- Behavior remains the same as the physical key press
- Rust-based Linux/X11 key repeater
- Visual keyboard layout with key state indicators
- Profile support for saving key sets and device settings
- Input device selection for manual keyboard path
- Efficient timer-driven repeat implementation
main.rs- App entry point and eframe initializationapp.rs- Application state, profile logic, and key mode handlingkeyboard.rs- Keyboard layout definitions and key renderinginput_handler.rs- Linux evdev input detectionkey_sender.rs- Synthetic input sending to the systemprofile.rs- Profile and settings persistenceui.rs- egui-based user interface
# Ubuntu/Debian
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
# Fedora
sudo dnf install libxcb-devel libxkbcommon-devel
# Arch
sudo pacman -S libxcb libxkbcommon opensslThis app requires elevated permissions to:
- Read keyboard input from
/dev/input/eventX - Send synthetic keys via
/dev/uinput
cd spammy-rust
cargo build --releasesudo ./target/release/spammyTo make Spammy appear in the Linux application menu for other users:
- Install the binary to a standard path, for example:
/usr/local/bin/spammy- or
~/.local/bin/spammy
- Create a
.desktopfile at~/.local/share/applications/spammy.desktopor/usr/share/applications/spammy.desktop - Optionally add an icon at
~/.local/share/icons/hicolor/256x256/apps/spammy.png
Example spammy.desktop:
[Desktop Entry]
Name=Spammy
Comment=Rust X11 key repeater
Exec=sudo /usr/local/bin/spammy
Icon=spammy
Terminal=false
Type=Application
Categories=Utility;Game;After this, Spammy should appear in the start menu under Utilities or Games.
- Start the app with
sudo - Select the input device if needed
- Use the on-screen keyboard to toggle key modes:
- left-click = Spammy (orange)
- right-click = Speedy (yellow)
- Enable the app and press the physical key to trigger the selected behavior
Repeat interval and profile settings are managed in the profile system. Profiles store active keys, speedy keys, repeat timing, and input device selection.
This project is intended for X11 on Linux and is a fork of the original Spammy utility.
The app couldn't locate your keyboard in /dev/input/. Check which device is your keyboard:
cat /proc/bus/input/devices | grep -A5 "keyboard\|Keyboard"
# Look for the event number, e.g., "event6"Then modify input_handler.rs to use the correct device.
Ensure you're running with sudo. Alternatively, add your user to the input group:
sudo usermod -a -G input $USER
sudo usermod -a -G uinput $USER
# Log out and back inThe low-lag design follows these principles from Linux input best practices:
- inotify/epoll: Event-driven, not polling
- Timer-based execution: Only send keys every X ms
- Direct uinput: No subprocess overhead (vs xdotool)
- Main loop sleep: 10ms to let OS breathe
# Static build
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release
# Debug symbols for debugging
cargo build --release --keep-going