I am using a german Windows keyboard and want to map the key with <>| on it to actually really write these symbols. Currently it writes

<>| without modifier:        ^
<>| with option key:         „
<>| with command or control: nothing 

Using the app Key codesI figured out that <>| has a unicode of 0xA, so I tried these mappings in my DefaultKeyBinding.dict:

"\UA" = ("insertText:", "<");  // forgot what this becomes
"$\UA" = ("insertText:", ">"); // becomes ° instead of <
"~\UA" = ("insertText:", "|"); // becomes „ instead of |

I commented right next to it what's the result after of course logging out and logging in again. Other key mappings work fine, I even disabled them during testing to make sure there are no conflicts.

Can anyone help me with this? What am I doing wrong? Is there any way to debug this?

Note: The key I am talking about can be seen here: https://en.wikipedia.org/wiki/German_keyboard_layout#/media/File:KB_Germany.svg It is the key over the left windows key.

Update: I think I found one part of the issue: I confused unicode code and key code. MacOS expects the unicode code, I gave the key code. The problem I have is that the Key Codes app gives no unicode code for the key with <>| on it, only a key code (0xA -> \UA in DefaultKeyBinding.dict)

Update2: found the solution, see my answer below.

  • What does your topmost leftmost key produce? Commented Dec 7, 2019 at 20:10
  • @TomGewecke: Guess you mean the key left from the 1!, right? (topmmost leftmost would be the escape key) This produces without modifier keys: < with shift: > and with option key: ≤ What's your idea behind this question? Commented Dec 8, 2019 at 11:29
  • I added an update to my original post. Commented Dec 8, 2019 at 11:37

2 Answers 2


An easy alternative is to make a custom layout with Ukelele. See if this one does what you need.

  • Thank you, didn't yet know that software and the possiblity of a custom layout. Will have a look at it. How about posting your config as code here, so it's independent from Dropbox? Commented Dec 8, 2019 at 11:30
  • Found the solution while I actually tried to activate your keyboard layout :-) See my answer below. Thanks for your efforts, without them I wouldn't have stumbled over the missing setting :-) Commented Dec 8, 2019 at 12:17

Seems I didn't finish the keyboard wizard for the new keyboard. Went to settings - keyboard, there it popped up and it asked me exactly for the key right to the left shift key. That's exactly the key causing issues for me. I pressed that key, the wizard recommended me european keyboard layout, I accepted. Voila, the key now writes < and with shift >. One thing that didnt work was writing the pipe symbol together with the option key. I added this rule to DefaultKeyBinding.dict:

"~<" = ("insertText:", "|");

Logged out and in, and now I can also write the pipe symbol with option key and the <>| key.

Lesson learned: unicode code for a key depends on the chosen keyboard layout.

You must log in to answer this question.

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