Sway : Sway Esc and Caps.

This commit is contained in:
Dmitry Voronin 2024-04-04 21:55:44 +03:00
parent 7a2aa652d5
commit 3124bf3a50
4 changed files with 17 additions and 2 deletions

View file

@ -120,6 +120,7 @@
./module/common/Firewall.nix
./module/common/Font.nix
./module/common/Git.nix
./module/common/KbdInterception.nix
./module/common/Kernel.nix
./module/common/Ld.nix
./module/common/Locale.nix

View file

@ -1,7 +1,10 @@
{ ... }: {
{ lib, ... }: {
imports = [
./Filesystem.nix
./Tablet.nix
./Vpn.nix
];
# Disable Kbd Interception.
services.interception-tools.enable = lib.mkForce false;
}

View file

@ -0,0 +1,11 @@
{ 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" ];
}];
};
}

View file

@ -32,7 +32,7 @@ input type:touchpad {
input type:keyboard {
xkb_layout us,ru
xkb_options grp:caps_toggle,lv3:ralt_switch
xkb_options grp:lctrl_toggle,lv3:ralt_switch
}
# Hide mouse cursor after a period of inactivity.