Skip to content

Instantly share code, notes, and snippets.

@adriandmitroca
Last active October 26, 2023 08:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriandmitroca/9f73dce60d37860fc2c39612f401c389 to your computer and use it in GitHub Desktop.
Save adriandmitroca/9f73dce60d37860fc2c39612f401c389 to your computer and use it in GitHub Desktop.
Fix right command / right alt on MX Keys not for Mac
# touch ~/mx-keys-remap.sh
#!/usr/bin/env bash
hidutil property --set '{"UserKeyMapping":
[{"HIDKeyboardModifierMappingSrc":0x7000000e7,
"HIDKeyboardModifierMappingDst":0x7000000e6}]
}'
# chmod +x ~/mx-keys-remap.sh
# Autostart below doesn't work on latest macOS Ventura. You need to run the script after every reboot.
# sudo defaults write com.apple.loginwindow LoginHook /Users/USERNAME/mx-keys-remap.sh
# ~/.mx-keys-remap.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment