From b5478e2f9d7f415ced04967a1426661acc1079ff Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Wed, 5 Aug 2026 22:22:03 +0200 Subject: [PATCH] Bring back remap! Partial undo of 91507f173dceb26226c3e5badd80323bc8660746 --- hosts/mars/home.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hosts/mars/home.nix b/hosts/mars/home.nix index 81dbb80..f478394 100644 --- a/hosts/mars/home.nix +++ b/hosts/mars/home.nix @@ -36,4 +36,27 @@ # https://nest.pijul.com/yonkeltron/macOS-nix-config:main/ZLDSMIXK5XFW6.EIAAA # and # https://github.com/bgub/nix-macos-starter/tree/main + + launchd.agents.keyboard-remap = { + # Remap top-left key (paragraph) to backquote and backslash like + # proper ISO keyboard does, and the key right to the LShift to + # Shift. + enable = true; + config = { + Label = "com.user.keyboard-remap"; + ProgramArguments = [ + "/usr/bin/hidutil" + "property" + "--set" + '' + {"UserKeyMapping": + [ + {"HIDKeyboardModifierMappingSrc":0x700000035, "HIDKeyboardModifierMappingDst":0x7000000e1}, + {"HIDKeyboardModifierMappingSrc":0x700000064, "HIDKeyboardModifierMappingDst":0x700000035}, + ] + }'' + ]; + RunAtLoad = true; + }; + }; }