Skip to content

svenFeng/lanmai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lanmai

lanmai is a key mapping software on Linux.

features

  • 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

dependencies

  • libevdev
  • libudev

build and install

git clone https://github.com/svenFeng/lanmai.git
cd lanmai
mkdir build
cd build
cmake ..
make
sudo make install

usage

configuration

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.

run

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

tips

multi-devices

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.

grab wrong device

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.

TODO

P0

  • real-time derives detecting and mapping
  • better logger

P1

  • verify it in Coq/TLA+

About

lanmai is a key mapping software on Linux.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published