|Travis Burtrum 552cd50266||2 months ago|
|.ci||2 months ago|
|src||2 months ago|
|systemd||4 years ago|
|.gitignore||2 years ago|
|Cargo.lock||2 months ago|
|Cargo.toml||2 months ago|
|LICENSE.md||4 years ago|
|README.md||2 months ago|
|appveyor.yml||1 year ago|
|keymap.toml||8 months ago|
|notes.txt||4 years ago|
|win.sh||2 years ago|
low level keyboard mapper for linux and windows, with advanced caps lock and shift swapping behavior
If you ever have mapped keys on linux, you know that there is the console keymap (loadkeys) and the X keymap (setxkbmap), also things like SDL and Virtualbox grab the input directly and respect no maps. Lastly I want to revert to QWERTY when holding ctrl so ctrl+c works just like normal, without remapping all programs to ctrl+j. Linux keymaps cannot do this either.
This solution is what rusty-keys implements, it works in ttys, in X, in Wayland, in virtualbox even running windows or whatever, on SDL games, it will work literally everywhere, because rusty-keys just creates a regular keyboard.
When ran, it will read a keymap.toml configuration file, refer to example and tweak to suit.
Usage: rusty-keys [options] [device_files...] Options: -h, --help prints this help message -v, --version prints the version -c, --config FILE specify the keymap config file to use (default: /etc/rusty-keys/keymap.toml)
when ran without specifying input devices, it maps all currently connected keyboards, and watches /dev/input/ with
inotify and starts mapping any new keyboards that are plugged in forever, until you kill it:
or you can specify one or multiple input devices, and it will run until all are disconnected, then stop:
rusty-keys /dev/input/event0 or
rusty-keys /dev/input/event0 /dev/input/event2
An example systemd service is in systemd/rusty-keys.service, enable it to have mapped keyboards all the time.
cargo install rusty-keys
AGPLv3 for now, message me if you have a problem with this