Giter Site home page Giter Site logo

fatkelp's Introduction

fatkelp

fatkelp is a program that forwards events from /dev/input/eventX to /dev/uinput and also remap keys

Usage

Redirect second keyboard to /dev/uinput

Find the id of the second keyboard, in this case it is 15

 nanashi$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SIGMACHIP Usb Mouse                       id=9    [slave  pointer  (2)]
⎜   ↳ SEMICO USB Keyboard Consumer Control      id=11   [slave  pointer  (2)]
⎜   ↳ SEMICO USB Keyboard Consumer Control      id=16   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ SEMICO USB Keyboard                       id=10   [slave  keyboard (3)]
    ↳ SEMICO USB Keyboard System Control        id=12   [slave  keyboard (3)]
    ↳ SEMICO USB Keyboard Consumer Control      id=14   [slave  keyboard (3)]
    ↳ C-Media Electronics Inc. USB Audio Device id=13   [slave  keyboard (3)]
    ↳ SEMICO USB Keyboard                       id=15   [slave  keyboard (3)]
    ↳ SEMICO USB Keyboard Consumer Control      id=17   [slave  keyboard (3)]
    ↳ SEMICO USB Keyboard System Control        id=18   [slave  keyboard (3)]

Deattach second keyboard

xinput float 15

Find keyboard, in this case it is 15

nanashi$ sudo fatkelp -l
[sudo] password for nanashi: 
15       SEMICO USB Keyboard System Control
14       SEMICO USB Keyboard Consumer Control
13       SEMICO USB Keyboard
2        C-Media Electronics Inc. USB Audio Device
12       HDA ATI HDMI HDMI/DP,pcm=9
11       HDA ATI HDMI HDMI/DP,pcm=8
10       HDA ATI HDMI HDMI/DP,pcm=7
9        HDA ATI HDMI HDMI/DP,pcm=3
8        PC Speaker
7        Video Bus
6        SEMICO USB Keyboard System Control
5        SEMICO USB Keyboard Consumer Control
4        SEMICO USB Keyboard
3        SIGMACHIP Usb Mouse
1        Power Button
0        Power Button

Forward /dev/input/event15 to /dev/uinput

sudo fatkelp -x 15

Installation

Run the following command as root(su or sudo)

curl https://raw.githubusercontent.com/nanashi-1/fatkelp/main/installer.sh > installer.sh; chmod +x installer.sh; sudo ./installer.sh

Install dependencies

pip install evdev

fatkelp's People

Contributors

nanashi-1 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

dblencowe

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.