Skip to content

Instantly share code, notes, and snippets.

@alexhayes
Last active August 26, 2021 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexhayes/be6257459eb7a2dbc1e5b2baaebdac90 to your computer and use it in GitHub Desktop.
Save alexhayes/be6257459eb7a2dbc1e5b2baaebdac90 to your computer and use it in GitHub Desktop.
~/Library/LaunchAgents/MapContextKeyToF20.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
This remaps the Context Key (between the right hand Alt and Control on a normal keyboard) to the F20 key.
See https://apple.stackexchange.com/a/398797/264061
Source is stored in https://gist.github.com/alexhayes/be6257459eb7a2dbc1e5b2baaebdac90
-->
<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": 0x700000065,
"HIDKeyboardModifierMappingDst": 0x70000006F
}
]}</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment