38

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, 2009 at 11:03
  • Another side note, that symbol is there in all layouts I've seen. Sep 7, 2009 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, 2009 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, 2009 at 7:20

3 Answers 3

28

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, 2009 at 10:49
  • 1
    It's odd how I couldn't find this application after searching so much
    – Ahmet
    Sep 7, 2009 at 10:50
  • Oh, by the way, glad it worked for you :)
    – alex
    Sep 7, 2009 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, 2012 at 13:33
  • Exellent app, except it seems to reinterpret key codes in real time instead of remapping them through some kind of system properties which causes key repeat rate to drop significantly - deal braker for me, I use arrow keys in text editors a lot. Oct 3, 2012 at 12:38
41

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).

4
  • 1
    please keep in mind that if you have a configurable external keyboard this mapping can do the reverse on it
    – taras
    Oct 6, 2020 at 7:37
  • 1
    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, 2021 at 12:27
  • This is not persisted across system restarts. You have to run it every time the system restarts.
    – X09
    Nov 11, 2022 at 7:44
  • Works in Monterey 12.6.6
    – scipilot
    Jul 16, 2023 at 19:27
8

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

6
  • 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, 2017 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, 2018 at 22:33
  • Karabiner Elements is the way to go for Mac users everywhere.
    – Mystic
    Jul 26, 2020 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.
    – urosc
    Dec 9, 2020 at 18:36
  • Does anyone know any alternatives to Karabiner Elements? I keep getting "key is ignored until pressed again" for my fixes. Mar 27, 2023 at 5:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .