File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ core_brightness_defaults_val='{
228228sudo defaults write /var/root/Library/Preferences/com.apple.CoreBrightness.plist " $core_brightness_defaults_key " " $core_brightness_defaults_val "
229229
230230# Remap Caps Lock as Control (see https://developer.apple.com/library/archive/technotes/tn2450/_index.html)
231- modifiermapping_key =" $(
231+ modifiermapping =" $(
232232 hidutil list --ndjson | jq -r '
233233 select(
234234 ."Built-In" == true and
@@ -238,7 +238,7 @@ modifiermapping_key="$(
238238 | "com.apple.keyboard.modifiermapping.\(.VendorID)-\(.ProductID)-0"
239239 ' | head -n1
240240) "
241- if [[ -z $modifiermapping_key ]]; then
241+ if [[ -z $modifiermapping ]]; then
242242 echo " Unable to find a built-in keyboard for persistent modifier mapping." >&2
243243else
244244 hidutil property --set ' {
247247 "HIDKeyboardModifierMappingDst": 0x7000000E0,
248248 }]
249249 }'
250- defaults -currentHost write NSGlobalDomain " $modifiermapping_key " -array ' {
250+ defaults -currentHost write NSGlobalDomain " $modifiermapping " -array ' {
251251 HIDKeyboardModifierMappingSrc = 30064771129;
252252 HIDKeyboardModifierMappingDst = 30064771296;
253253 }'
You can’t perform that action at this time.
0 commit comments