--- date: 2022-06-05T10:26:08.000Z title: remap §/± to `/~ on max osx draft: false snippet_types: - mac - osx seo_description: How to remap (§) section sign to (`) backslash on mac. --- Got a new Macbook Pro with the start of my new job and I love it. Except. It did not come with and english keyboard. Now every time I try to type the backslash (\`) or tilde (\~) instead I get "§" or "±" 😔. Lucky for me there are a bunch of people with the same issue. This base command to remap the key is: ```shell $ hidutil property --set '{"UserKeyMapping": [{"HIDKeyboardModifierMappingSrc":0x700000064, "HIDKeyboardModifierMappingDst":0x700000035}] }' ``` but to make this survive a computer restart things get a little more complicated. For that you need you need a LaunchDaemon. /Library/LaunchDaemons/org.custom.backslash-key-remap-fix.plist ```xml Label org.custom.backslash-key-remap-fix ProgramArguments /Users/travis.shears/projects/scripts/bin/backslash-key-remap-fix.sh RunAtLoad KeepAlive ``` /Users/travis.shears/projects/scripts/bin/backslash-key-remap-fix.sh ```shell #/bin/sh -e hidutil property --set '{"UserKeyMapping": [{"HIDKeyboardModifierMappingSrc":0x700000064, "HIDKeyboardModifierMappingDst":0x700000035}] }' ``` ## Sources: * [https://rakhesh.com/mac/using-hidutil-to-map-macos-keyboard-keys/](https://rakhesh.com/mac/using-hidutil-to-map-macos-keyboard-keys/) * [https://www.grzegorowski.com/how-to-remap-single-mac-keyboard-key](https://www.grzegorowski.com/how-to-remap-single-mac-keyboard-key) * [https://superuser.com/questions/37042/remapping-of-keys-in-mac-os-x](https://superuser.com/questions/37042/remapping-of-keys-in-mac-os-x)