From 30cc577558827dfc54e52e8904c2fb42aed996bf Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 31 May 2026 13:13:37 +0200 Subject: [PATCH 1/2] change hyperkey to esc --- modules/darwin/karabiner.nix | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index 15b8fee..d049aaa 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -87,13 +87,30 @@ let # manipulators = manipulators; # } { - description = "Hyperkey"; + description = "Caps Lock to Escape"; manipulators = [ { from = { key_code = "caps_lock"; modifiers = { optional = [ "any" ]; }; }; + to = [ + { + key_code = "escape"; + } + ]; + type = "basic"; + } + ]; + } + { + description = "Escape to Hyperkey"; + manipulators = [ + { + from = { + key_code = "escape"; + modifiers = { optional = [ "any" ]; }; + }; to = [ { key_code = "left_shift"; @@ -104,11 +121,6 @@ let ]; } ]; - to_if_alone = [ - { - key_code = "escape"; - } - ]; type = "basic"; } ]; From 7bf3bd5c8ad72991d3c3f45585cf0401ad40f041 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Thu, 4 Jun 2026 21:54:21 +0200 Subject: [PATCH 2/2] Add Logitech G213 key swap --- modules/darwin/karabiner.nix | 40 ++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index d049aaa..e41cd7b 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -79,6 +79,23 @@ let } ]; + logitechG213Identifiers = { + vendor_id = 1133; + product_id = 49974; + is_keyboard = true; + }; + + logitechG213SimpleModifications = [ + { + from.key_code = "left_command"; + to = [ { key_code = "left_option"; } ]; + } + { + from.key_code = "left_option"; + to = [ { key_code = "left_command"; } ]; + } + ]; + complex_modifications = { name = "Complex Modifications"; rules = [ @@ -87,30 +104,13 @@ let # manipulators = manipulators; # } { - description = "Caps Lock to Escape"; + description = "Caps Lock to Hyperkey"; manipulators = [ { from = { key_code = "caps_lock"; modifiers = { optional = [ "any" ]; }; }; - to = [ - { - key_code = "escape"; - } - ]; - type = "basic"; - } - ]; - } - { - description = "Escape to Hyperkey"; - manipulators = [ - { - from = { - key_code = "escape"; - modifiers = { optional = [ "any" ]; }; - }; to = [ { key_code = "left_shift"; @@ -323,6 +323,10 @@ let inherit complex_modifications; devices = [ + { + identifiers = logitechG213Identifiers; + simple_modifications = logitechG213SimpleModifications; + } { identifiers.is_keyboard = true; }