From 790cb4a9d00aa963c1c2d11edf4d095471cc10e6 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 5 Jun 2023 23:50:01 -0400 Subject: [PATCH] use keyd instead of xkb for key remap --- modules/nixos/hardware/keyboard.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/nixos/hardware/keyboard.nix b/modules/nixos/hardware/keyboard.nix index 4c23bee..0cfa11b 100644 --- a/modules/nixos/hardware/keyboard.nix +++ b/modules/nixos/hardware/keyboard.nix @@ -10,9 +10,12 @@ autoRepeatDelay = 250; autoRepeatInterval = 40; - # Swap escape key with caps lock key - xkbOptions = "eurosign:e,caps:swapescape"; + }; + # Use capslock as escape and/or control + services.keyd = { + enable = true; + settings = { main = { capslock = "overload(control, esc)"; }; }; }; # Enable num lock on login