A tool that lets you remap a keyboard/keypad on Linux, written in Rust
Since this uses evdev (which sits lower on the stack than X, Wayland, or even the tty), it should work in any environment.
Disclaimer
The reason there hasn't been a commit for months is that I don't have the time to work on this. I decided against archiving this repo for now, but I can't give an estimate on when it'll be completed. Meanwhile, there's a better alternative.