logoalt Hacker News

A key remapping daemon for Linux

39 pointsby joooschalast Wednesday at 5:27 PM19 commentsview on HN

Comments

procaryotetoday at 7:21 AM

This is one of many things that used to be easier before wayland

You can get pretty far with just the xkbd definions though, although you need root to reconfigure it.

A bit ironically, the easiest way I've found to create xkbd definions is to start an X11 server, reconfigure your xmodmap+xcompose, and export the current xkbd settings. Xmodmap is much easier to edit than editing xkbd directly.

sherrtoday at 5:53 AM

It's a shame that the title doesn't say what the s/w is : keyd.

I actually use keyd on my laptops because it seems to do everything I need and is easy to get going without any fuss. So thank you Raheman Vaiya.

petterstoday at 7:29 AM

> a hand tuned input loop written in C that takes <<1ms

Yes, I would certainly expect much less than 1ms. Perhaps 1µs should be the goal?

neosenatetoday at 6:57 AM

This is fantastic!

I wish window/app selection in Wayland was better. On my Mac I use a combination of Phoenix and Hyperkey to capture capslock + key combinations, (e.g. cap+f for Firefox) which when pressed, either open an app of my choice it not already open, or bring it to the front of the stack.

Last time I looked into it window and app selection in Wayland just didn’t work.

garciansmithtoday at 1:27 AM

I find this kind of keyboard remapping essential when using a laptop now that I'm used to using an external keyboard with QMK firmware at my desk (though these days I use Kmonad).

show 1 reply
innocentoldguytoday at 7:49 AM

I use Karabiner-Elements on macOS, and finding keyd was a godsend on Linux. I cannot deal with standard keyboard mappings and the lack of hold/tap keys.

rreyes1979today at 7:20 AM

I use it to remap my mouse keys. Works like a charm on Fedora Silverblue.

themafiatoday at 7:46 AM

I've done nearly the same thing and have called it 'keyd' as well.

It's a little more inspired by a "djb" style design. Instead of having a configuration file, the program takes a single argument which is meant to be a directory. Then, if code 113 is pressed, it looks for an executable file named '113' in the given directory and if it exists will execute it. If not found it then tries '113+', then on release it will try '113-'.

Refreeze5224today at 2:22 AM

This is fantastic. Works perfectly right off the bat. I have so much trouble just getting capslock to be control consistently in Linux, and this made it easy.

joooschalast Wednesday at 5:27 PM

I used this to remap the space key to be a modifier key and thought it might be useful for some.

zarflaxtoday at 2:40 AM

Now I can finally reimplement spacebar heating!

lostmsutoday at 3:37 AM

What are the differences between this and https://github.com/sezanzeb/input-remapper ?

show 1 reply
smallmancontrovtoday at 2:07 AM

Thanks keyd! You replaced a number of utterly shameful and janktacular python scripts.