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; + }; + }; }