-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcom.local.KeyRemapping.plist
More file actions
41 lines (41 loc) · 1.84 KB
/
com.local.KeyRemapping.plist
File metadata and controls
41 lines (41 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8"?>
<!-- To Make Changes...
1) Get the HID key codes `ioreg -l | grep FnFunctionUsageMap`
a) for each pair, the first is the fn key code and the second is the behavior printed on the keycap
2) the FnFunctionUsageMap returns 32 bit numbers, but hidutil uses 64 bit numbers
a) to address this, pad up each 16 bit pair
b) ex: 0x000c00cf is equivalent to 0x000c 0x00cf and becomes 0x0000 0x000c 0x0000 0x00cf which is equivalent to 0x0000000c000000cf
3) update the KeyRemapping file accordingly
4) here's the current values:
{ "HIDKeyboardModifierMappingSrc":0x0000ff0100000010, // mission control
"HIDKeyboardModifierMappingDst":0x0000000700000068 // f13
},{ "HIDKeyboardModifierMappingSrc":0x0000000c00000221, // spotlight
"HIDKeyboardModifierMappingDst":0x000000070000006a // f15
},{ "HIDKeyboardModifierMappingSrc":0x0000000c000000cf, // dictation
"HIDKeyboardModifierMappingDst":0x0000000700000069 // f14
}
-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.local.KeyRemapping</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
<string>--set</string>
<string>{"UserKeyMapping":[
{ "HIDKeyboardModifierMappingSrc":0x0000ff0100000010,
"HIDKeyboardModifierMappingDst":0x0000000700000068
},{ "HIDKeyboardModifierMappingSrc":0x0000000c00000221,
"HIDKeyboardModifierMappingDst":0x000000070000006a
},{ "HIDKeyboardModifierMappingSrc":0x0000000c000000cf,
"HIDKeyboardModifierMappingDst":0x0000000700000069
}
]}</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>