Giter Site home page Giter Site logo

b83c / ioctl_keymapping Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10 KB

Simple keymapping employing ioctl which works in both X11 and console. Not a daemon, its execution is one-shot.

C 73.74% Objective-C 4.82% Makefile 18.75% Shell 2.70%
ioctl keymapping

ioctl_keymapping's Introduction

IOCTL KEYMAPPING UTILITY

Simple keymapping employing ioctl which works in both X11 and console. Not a daemon, its execution is one-shot.

INSTALLATION

Paste the commands into your terminal and hit enter

git clone https://github.com/b83c/ioctl_keymapping
cd ioctl_keymapping
make clean && make install #This will install the binary file into /usr/local/bin and at the same time, create a systemd service.

CONFIGURATION

By default, config.h doesn't exist in the repository, and is copied from config.def.h at compile time. And of course, you can manually make a copy of your own. Below is an example that works on most laptops:

//Format: {KEY_TO_BE_MAPPED, MAPPED_KEY}
static unsigned scancode_keycodes[][2] = {
    {KEY_KP1, KEY_LEFT},
    {KEY_KP2, KEY_DOWN},
    {KEY_KP3, KEY_UP},
    {KEY_KPMINUS, KEY_RIGHT}
};

static char* keyboards[] = {
    "AT Translated Set 2 keyboard" //Do xinput list to retrieve your keyboard name.
}

TODO

Reduce syscalls and boost performance.

LICENSE

none

ioctl_keymapping's People

Contributors

b83c avatar

Watchers

 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.