Code Monkey home page Code Monkey logo

caps-ijkl's Introduction

c-hjkl

c-hjkl

c-hjkl remaps Ctrl + hjkl into arrow keys on Linux. (X11/Wayland/Console)

Why did you make this?

I've been using AutoKey on my Linux desktop to remap keys, but it has problems:

  • It stops working on Wayland.
  • It gets laggy when keys are repeatedly pressed, since it needs to run a Python script each macro keystroke.

So here I built one that solves the above problems for me. All I needed was just remapping Ctrl-H/J/K/L into arrow keys like Vim.

How does it work?

It reads and retains exclusive access to your keyboard (/dev/input/...) and creates a new UInput device(a virtual keyboard) that gets piped with the keyboard events from your actual keyboard. Then, whenever it encounters a combination it wants to override (i.e. C-hjkl), it does not forward the original key events and sends the fake key events.

Can I change the Ctrl key to something else?

No. this project's scope will be limited to C-hjkl for now. But I'll accept PRs if you make it as an option!

To do

  • Implement the basic functionality
  • Auto-detect keyboard input devices and grab them
  • Provide installable artifacts on popular Linux distros (e.g. *.deb, *.rpm, ...)

caps-ijkl's People

Contributors

kocsis1david avatar stewartpark avatar

Stargazers

yaoyu avatar

Forkers

y60yu1ii

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.