23

My MBP comes with a Turkish keyboard but I'm using US layout. However, the key just under ESC gives § instead of ` (back-quote) which I frequently use.

I need to remap this key but I couldn't find any information except remapping of modifier keys. How can I do it?

6
  • As a side point, on my keyboard (UK) the backtick is between the left shift and Z keys
    – Xetius
    Sep 7 '09 at 11:03
  • Another side note, that symbol is there in all layouts I've seen. Sep 7 '09 at 11:13
  • normally it is just under ESC key in windows and linux pcs. at least that is more accesable for us that deal with linux, latex, lisp. And finally it is used for switching application windows in Mac OS X.
    – Ahmet
    Sep 7 '09 at 11:50
  • 1
  • 1
    thank you Nippysaurus but doublecommand takes care of only modifier keys. backquote is not covered by it. i've tried both and found keyremap4macbook more powerful
    – Ahmet
    Sep 8 '09 at 7:20
20

Try KeyRemap4MacBook. It seems to offer a lot of options. Maybe it will fix your problem as well. Here's what it says about it:

This is a very powerful keyboard remapper for Mac OS X. In addition to simple key remapping, it has special remapping modes like Emacs-mode, SandS-mode (Space and Shift).

6
  • Perfect solution Alex. Did a find on § on KeyRemap4MacBook's UI and found the feature of Remapping Paragraph(§) to Backquote (`). Thank you
    – Ahmet
    Sep 7 '09 at 10:49
  • 1
    It's odd how I couldn't find this application after searching so much
    – Ahmet
    Sep 7 '09 at 10:50
  • I searched for macbook key remapping. Maybe you just checked for mac key remapping :). If this worked for you, please consider marking it as the accepted answer.
    – alex
    Sep 7 '09 at 10:57
  • Oh, by the way, glad it worked for you :)
    – alex
    Sep 7 '09 at 10:58
  • 1
    Love it! Found my exact case! It means I am not the only one with this weird mapping problem - Apple should listen to users... Apr 20 '12 at 13:33
18

You can use the hidutil command-line tool, which comes with macOS since Sierra 10.12:

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

The keys are referenced by Usage ID from the USB HID Usage Tables Specification. The section key § is listed as "Keyboard Non-US \ and |" (0x64, see https://discussions.apple.com/thread/8133633) and backtick ` is "Keyboard Grave Accent and Tilde" (0x35).

5
  • 4
    Should be the accepted answer. Thank you so much. Buying keyboards with "proper" US layouts when you are a programmer living overseas is a total pain in the butt. Thankfully at least Ubuntu is interpreting this § as grave natively.
    – Benjamin R
    Sep 11 '20 at 17:34
  • please keep in mind that if you have a configurable external keyboard this mapping can do the reverse on it Oct 6 '20 at 7:37
  • 1
    by far the best answer, thank you
    – grepit
    Oct 16 '20 at 18:08
  • Truely awesome answer, and you even saved me the lookup because I had the same use case. I'll just add that it works great on Big Sur.
    – noamtm
    Feb 16 at 8:00
  • Also, if you want to swop the keys (and not just replace § with `), then you'll need to add the reverse mapping to that JSON array as well.
    – Dave
    Mar 4 at 12:27
7

Mac 10.12 sierra users should use this: https://github.com/tekezo/Karabiner-Elements

DMG download: https://pqrs.org/latest/karabiner-elements-latest.dmg

In "From key", I selected the option with Japanese characters and in To key I selected GRAVE_ACCENT_AND_TILDE (`).

image

4
  • 2
    Instead of the Japanese characters, I'm using non_us_backslash. You can view the exact character you need to map from Karabiner-EventViewer app.
    – ceilfors
    Apr 4 '17 at 8:37
  • Yes! I cannot believe that so few people are having this problem. This worked great for me--just a small issue I have is that now when I type "˜" I get small tilde initially instead of the one I want (~) for that to happen I still need to press space. Any ideas how to get rid of that? Oct 7 '18 at 22:33
  • Karabiner Elements is the way to go for Mac users everywhere.
    – Mystic
    Jul 26 '20 at 15:10
  • except for the Karabinier Elements being marked as untrusted app by Mac OS X. As well the fact that Karabiner Elements is enabled as an Accessibility service and basically has access to everything you type. I have been using it for some time, but seriously considering to find a safer solution after I started experiencing strange issues with my Mac OS X Catalina.
    – ross-u
    Dec 9 '20 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.