12 lines
487 B
Nix
12 lines
487 B
Nix
{ pkgs, ... }: {
|
|
# Map CapsLock to Esc on single press and Ctrl on when used with multiple keys.
|
|
services.interception-tools = {
|
|
enable = true;
|
|
plugins = [ pkgs.interception-tools-plugins.caps2esc ];
|
|
udevmonConfig = builtins.toJSON [{
|
|
JOB = "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE";
|
|
DEVICE.EVENTS.EV_KEY = [ "KEY_CAPSLOCK" "KEY_ESC" ];
|
|
}];
|
|
};
|
|
}
|