Stop accidental palm taps on Hyprland
touchy streams hardware keyboard events through libinput and automatically disables the touchpad while you type. Zero lag, ultra-responsive, and gamer friendly.
Automated bootstrap or build via CMake in seconds.
Why Use touchy?
A specialized daemon designed to solve the annoying palm-brush problem on Linux laptops once and for all.
Instantaneous Kernel Stream
Streams raw keyboard events directly from libinput debug-events. Touchpad lockout triggers on the very first keypress without waiting for compositor event routing.
Integrated Game Mode
Playing an FPS or trackpad game? Simply touch a semaphore lock file (/tmp/.game_mode_on) and touchy gracefully suspends lockout behavior so your controls remain active.
Full Configuration Cascading
Configure your device name, timeout debounce, notification verbosity, and log levels via ~/.touchyrc, ~/.config/touchy/touchyrc, or environment variables.
Installation
Choose between the one-line bootstrap installer or building from source using CMake:
Method 1: Fast Automated Bootstrap
Downloads the latest release archive, extracts, builds, and installs the binary and man pages to /usr/local/bin:
Method 2: Manual Clone & CMake Build
Clone the repository, inspect the code, and install using the included CMake scripts:
System Prerequisites
Requires hyprland (with hyprctl), libinput (with libinput-tools), and optional libnotify for notification toasts. Ensure your user belongs to the input group to read libinput debug-events.
Hyprland Autostart Integration
To start touchy automatically when Hyprland launches your session, add an exec-once directive to your Hyprland configuration:
# Enhanced touchpad disable-while-typing daemon
exec-once = /usr/local/bin/touchyConfiguration & Environment
touchy can be configured via environment variables or in an RC file located at ~/.touchyrc or ~/.config/touchy/touchyrc.
Finding Your Touchpad Device Name
Run hyprctl devices to list input devices detected by Hyprland, and look for your touchpad identifier:
| Variable | Default | Description |
|---|---|---|
| TOUCHPAD | asuf1209:00-2808:0219-touchpad | Target touchpad device identifier in hyprctl. |
| TOUCHY_DELAY | 1 | Debounce sleep time in seconds after typing ends before re-enabling trackpad. |
| GAME_MODE_SEMAFORE_FILE | /tmp/.game_mode_on | File path indicating game mode is active (locks touchpad disabling). |
| TOUCHY_VERBOSITY | 1 | Console & notify-send verbosity level (higher = more logs & toast popups). |
| TOUCHY_LOGLEVEL | 0 | File log level for disk reporting in /tmp/.touchy.log. |
Example ~/.touchyrc
# Touchpad device from 'hyprctl devices'
TOUCHPAD="synps/2-synaptics-touchpad"
# Delay in seconds to wait after last keypress
TOUCHY_DELAY=0.8
# Keep desktop quiet
TOUCHY_VERBOSITY=0Game Mode Integration
When gaming on laptops, holding down movement keys (WASD) while aiming or clicking with the touchpad is essential. touchy checks for the presence of a semaphore file and bypasses lockout when enabled:
Enable Game Mode
Touch the semaphore file. The touchpad will stay active during keypresses:
Disable Game Mode
Remove the semaphore file to resume normal disable-while-typing:
Frequently Asked Questions
Why does libinput report permission denied?
Reading raw device events via libinput debug-events requires access to /dev/input/event*. Add your user to the input group via sudo usermod -a -G input $USER, then log out and back in.
Can I adapt touchy for Sway or River compositors?
Yes! The core event loop monitors libinput. Replacing the hyprctl keyword device[...] invocations with swaymsg input "<device>" events disabled is straightforward. Pull requests are welcomed!