Skip to content

Instantly share code, notes, and snippets.

@byrontuckett
Last active December 26, 2025 12:18
Show Gist options
  • Select an option

  • Save byrontuckett/3bcac5002702022a89d0ef6d2a884e42 to your computer and use it in GitHub Desktop.

Select an option

Save byrontuckett/3bcac5002702022a89d0ef6d2a884e42 to your computer and use it in GitHub Desktop.
How to remap caps lock to backspace in macOS

Remap useless caps lock buttopn to backspace.

Tested on macOS 12.5 Use at own risk

Run this command to set caps lock keyboard button to the backspace

Note this is not persistent. You will need to do this on each boot or add to your boot procedure/profile.

hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x70000002A}]}'

Current Mappings

Check current user mappings with:

hidutil property --get "UserKeyMapping"

Credit

full credit goes to http://homeowmorphism.com/2017/05/27/Remap-CapsLock-Backspace-Sierra

Want to map to Control or some other key? Have a look at the key mappings listed on the Apple macOS key binding page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment