krish-r/caps2esc
Remap `CAPS LOCK` to `ESC` in Linux systems.
Remap CAPS LOCK
to ESC
in Linux systems.
This is inspired by / based on evremap by wez.
Uses libevdev
to grab exclusive access to the input device, reads input events, remaps CAPS LOCK
to ESC
and writes them back to a virtual output device.
sudo zig-out/bin/caps2esc --list-devices
sudo zig-out/bin/caps2esc --device 'device-name'
libevdev
development package (Fedora: sudo dnf install libevdev-devel
| Debian/Ubuntu: sudo apt install libevdev-dev
)zig build -Doptimize=ReleaseSafe
systemd
Note: Update the path and device name in the example service file (caps2esc.service
) and the below command.
sudo cp ~/example-path/caps2esc/caps2esc.service /usr/lib/systemd/system/
sudo systemctl enable caps2esc.service
sudo systemctl start caps2esc.service
systemctl status caps2esc.service