nix-config/hosts/thinkpad/keyboard.nix

38 lines
1008 B
Nix

{
services.kanata = {
enable = true;
keyboards = {
internalKeyboard = {
devices = [
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
extraDefCfg = "process-unmapped-keys yes";
config = ''
(defsrc
caps a s d f j k l ;
)
(defvar
tap-time 150
hold-time 200
)
(defalias
caps (tap-hold 100 100 esc lctl)
a (tap-hold $tap-time $hold-time a lsft)
s (tap-hold $tap-time $hold-time s lalt)
d (tap-hold $tap-time $hold-time d lmet)
f (tap-hold $tap-time $hold-time f lctl)
j (tap-hold $tap-time $hold-time j rctl)
k (tap-hold $tap-time $hold-time k rmet)
l (tap-hold $tap-time $hold-time l ralt)
; (tap-hold $tap-time $hold-time ; rsft)
)
(deflayer base
@caps @a @s @d @f @j @k @l @;
)
'';
};
};
};
}