Skip to content

Instantly share code, notes, and snippets.

@aswathkk
Created August 17, 2019 15:34
Show Gist options
  • Save aswathkk/319c88788eb335259639d413488a95b1 to your computer and use it in GitHub Desktop.
Save aswathkk/319c88788eb335259639d413488a95b1 to your computer and use it in GitHub Desktop.
Remap CapsLock to ESC and ESC to CapsLock
# For MacOS > Sierra
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000029,"HIDKeyboardModifierMappingDst":0x700000039}]}'
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}'
# For Ubuntu
setxkbmap -option caps:escape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment