{ config, lib, pkgs, ... }: { services.keyd = { enable = true; keyboards = { default = { ids = [ "*" ]; settings = { main = { capslock = "layer(capslayer)"; "'" = "G-'"; }; otherlayer = {}; capslayer = { # arrow keys vimlike j = "down"; h = "left"; k = "up"; l = "right"; # german special keys a = "G-q"; o = "G-p"; u = "G-y"; s = "G-s"; e = "G-5"; }; }; extraConfig = '' # extra conf here ''; }; }; }; # 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 ''; }