Keyd is a daemon written by rvaiya that lets you customize how your Linux computer listens to your keyboard. It gives normal keyboards plugged into your computer only qmk or custom firmware keyboards get.
I have a qmk keyboard, which was mentioned in this post: My old keyboard is basically cheating
This is what a non-Nix, normal keyd config looks like.
[ids]
*
[main]
# Maps capslock to escape when pressed and control when held.
capslock = overload(control, esc)
# Remaps the escape key to capslock (uncomment below to enable)
# esc = capslockAs of writing this config needs to be placed in a file at /etc/keyd/default.conf. Doing just this doesn’t do anything, you also need to install the software, preferably through your package manager, otherwise you can always install from the github following the instructions: github.com/rvaiya/keyd.
Since I use NixOS, I don’t worry about installing and setting up the systemd service. I just have this in my config:
services.keyd = {
enable = true;
keyboards = {
default = {
ids = [ "*" ];
settings = {
main = {
capslock = "overload(control, esc)";
};
# otherlayer = {};
};
};
};
};
# Optional, but makes sure that when you type the make palm rejection work with keyd
# https://github.com/rvaiya/keyd/issues/723
environment.etc."libinput/local-overrides.quirks".text = ''
[Serial Keyboards]
MatchUdevType=keyboard
MatchName=keyd virtual keyboard
AttrKeyboardIntegration=internal
'';Most was taken from the NixOS Wiki, which shows the same config but without the overload. Instead, the wiki suggests just mapping the capslock key be a control key with this: capslock = "layer(control)";
I should also mention there is experimental custom application keybind support.
Thanks to keyd, my laptop keyboard is easier to use with vim and behaves closer to my qmk keyboards. I could even setup home row mods if I go down that road.
🪧 Enjoy Reading This?
Get notified of future posts by RSS!
Here are some more you might like to read next:
Devenv is Awesome!
Why devenv will change the way you think about developing software. Sep 24th 2024
Cosmic Desktop Environment is Awesome!
Why I'm excited even when daily driving it before release. Jul 24th 2024
Why NixOS is Awesome!
When did computing become scary? NixOS is here to the rescue! Jul 21st 2024
💬 Looking for comments?
I don't have comments on this site as they can be time consuming to manage. I'd rather concentrate on programming cool and new things.
Since you can't leave a comment, feel free to 📨 contact me instead.