github.com
xremap is a key remapper for Linux, written in Rust, that supports app-specific remapping and works on both X11 and Wayland via evdev and uinput. It can remap any key or key combination, remap key sequences, assign different actions for pressed-alone versus held keys, and trigger commands on key events.