Keyd : Migrate from KbdIntercept, thanks to lowlife.
This commit is contained in:
parent
632dd69d8a
commit
e4cbc297fd
|
@ -1,11 +0,0 @@
|
||||||
{ 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" ];
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
}
|
|
22
module/common/Keyd.nix
Normal file
22
module/common/Keyd.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.keyd = {
|
||||||
|
enable = true;
|
||||||
|
keyboards.default = {
|
||||||
|
ids = [ "*" ];
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
capslock = "overload(control, esc)";
|
||||||
|
compose = "layer(compose)";
|
||||||
|
esc = "capslock";
|
||||||
|
rightalt = "layer(rightalt)";
|
||||||
|
rightcontrol = "layer(rightcontrol)";
|
||||||
|
rightshift = "layer(rightshift)";
|
||||||
|
};
|
||||||
|
rightalt = {};
|
||||||
|
rightcontrol = {};
|
||||||
|
rightshift = {};
|
||||||
|
compose = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue