Change remap from script to system.keyboard.userKeyMapping
This commit is contained in:
parent
81eb1377d3
commit
02ff8573ea
38
darwin.nix
38
darwin.nix
|
@ -57,30 +57,28 @@
|
||||||
system.keyboard = {
|
system.keyboard = {
|
||||||
enableKeyMapping = true;
|
enableKeyMapping = true;
|
||||||
remapCapsLockToEscape = true;
|
remapCapsLockToEscape = true;
|
||||||
};
|
|
||||||
|
|
||||||
# Remap right command-option-shift
|
# remap right hand side modifier keys
|
||||||
launchd.user.agents.swap-keys = {
|
# https://developer.apple.com/library/archive/technotes/tn2450/_index.html
|
||||||
serviceConfig = {
|
userKeyMapping = let
|
||||||
ProgramArguments = [
|
lshift = 30064771297; # 0x7000000e1
|
||||||
"/usr/bin/hidutil" "property" "--set" ''
|
lcmd = 30064771299; # 0x7000000e3
|
||||||
{"UserKeyMapping":
|
rshift = 30064771301; # 0x7000000e5
|
||||||
[
|
ropt = 30064771302; # 0x7000000e6
|
||||||
|
rcmd = 30064771303; # 0x7000000e7
|
||||||
|
in [
|
||||||
{
|
{
|
||||||
"HIDKeyboardModifierMappingSrc":0x7000000e7,
|
HIDKeyboardModifierMappingSrc = rcmd;
|
||||||
"HIDKeyboardModifierMappingDst":0x7000000e1
|
HIDKeyboardModifierMappingDst = rshift;
|
||||||
}, {
|
|
||||||
"HIDKeyboardModifierMappingSrc":0x7000000e5,
|
|
||||||
"HIDKeyboardModifierMappingDst":0x7000000e6
|
|
||||||
}, {
|
|
||||||
"HIDKeyboardModifierMappingSrc":0x7000000e6,
|
|
||||||
"HIDKeyboardModifierMappingDst":0x7000000e3
|
|
||||||
}
|
}
|
||||||
]
|
{
|
||||||
|
HIDKeyboardModifierMappingSrc = rshift;
|
||||||
|
HIDKeyboardModifierMappingDst = ropt;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
HIDKeyboardModifierMappingSrc = ropt;
|
||||||
|
HIDKeyboardModifierMappingDst = rcmd;
|
||||||
}
|
}
|
||||||
''
|
|
||||||
];
|
];
|
||||||
RunAtLoad = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user