lanmai is a key mapping software on Linux.
- three mapping modes:
- single mapping
- double mapping, e.g., click CAPSLOCK => ESC, CAPSLOCK + other keys => CTRL + other keys
- meta mapping, it can be used to implement SpaceFn, e.g., click SPACE => SPACE, SPACE + h/j/k/l => Left/Down/Up/Right
- don't depend on XWindow
- libevdev
- libudev
git clone https://github.com/svenFeng/lanmai.git
cd lanmai
mkdir build
cd build
cmake ..
make
sudo make install
the default config file is /etc/lanmai.json, there existed some useful mappings, you can choose what you want, and change the enable
to true
.
lanmai need run by root user.
you can use lanmai --help
to see some options.
when you installed correctly, the etc/lanmai.service has been installed to /usr/lib/systemd/systemd/, so you can manage it by systemd.
# start
sudo systemctl start lanmai.service
# stop
sudo systemctl stop lanmai.service
# enable
sudo systemctl enable lanmai.service
lanmai don't support grab multi-devices now, if you have more than one keyboards, you can use --list-kbd-devices
option to find which device you want to grab, and use -d
option to specify it.
sometimes mouse(or others) may register as a keyboard, so lanmai may grab it, you can also use --list-kbd-devices
and -d
options to avoid that trouble like above.
- real-time derives detecting and mapping
- better logger
- verify it in Coq/TLA+