Skip to content

Instantly share code, notes, and snippets.

@jaredreich
Last active August 12, 2022 14:27
Show Gist options
  • Save jaredreich/8801c7a98af32d60fb663c791324eba9 to your computer and use it in GitHub Desktop.
Save jaredreich/8801c7a98af32d60fb663c791324eba9 to your computer and use it in GitHub Desktop.
M1 MacBook - Override F5 and F6 keys (dictation and do not disturb) to change keyboard brightness
<!-- Put this file in ~/Library/LaunchAgents (~/Library/LaunchAgents/com.local.KeyRemapping.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">
<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": 0xC000000CF,
"HIDKeyboardModifierMappingDst": 0xFF00000009
},
{
"HIDKeyboardModifierMappingSrc": 0x10000009B,
"HIDKeyboardModifierMappingDst": 0xFF00000008
}
]}</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