Code Monkey home page Code Monkey logo

lanmai's Introduction

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+

lanmai's People

Contributors

svenfeng avatar mnsfhxy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.