Skip to content

Instantly share code, notes, and snippets.

@rbreaves
Created December 5, 2022 05:21
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 rbreaves/e8fc4512c4f9682b1b3c9ad0a69dd5ab to your computer and use it in GitHub Desktop.
Save rbreaves/e8fc4512c4f9682b1b3c9ad0a69dd5ab to your computer and use it in GitHub Desktop.
Remap right cmd key to backspace (macos)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:</string>
</dict>
<key>Label</key>
<string>com.startup.startup</string>
<key>ProgramArguments</key>
<array>
<string>/Users/rreaves/startup.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>LaunchOnlyOnce</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/startup.startup.stderr</string>
<key>UserName</key>
<string>rreaves</string>
<key>GroupName</key>
<string>admin</string>
<key>InitGroups</key>
<true/>
</dict>
</plist>
#!/bin/bash
# vi ~/startup.sh
# chmod +x ~/startup.sh
# vi ~/Library/LaunchAgents/com.startup.startup.plist
hidutil property --set '{"UserKeyMapping":
[{"HIDKeyboardModifierMappingSrc":0x7000000e7,
"HIDKeyboardModifierMappingDst":0x70000002a}]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment