14

I'm using a German Keyboard (Lioncast LK20) with OS X 10.11.5. I set the keymap to German and it is displayed correctly in the settings screen. Unfortunately the following two keys are swapped when I type on the keyboard:

< Key (right of SHIFT)
^ Key (left of 1)

Are there any advanced settings to fix this issue?

enter image description here enter image description here

1
  • This maybe utterly stupid but you could try getting a small arduino to swap the keys for you where the keyboard would go through a bare USB port connected to the arduino and thorugh out of another USB port into your computer?
    – Bradman175
    May 30 '16 at 9:30
5
+50

You can use Ukelele to change the keyboard layout so the meaning of those keys are swapped:

http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele

Note the program is called "Ukelele", not "Ukulele".

1
  • This will swap the keys on any other keyboard you have connected. May 7 '19 at 10:44
9

I just had this happen to me, and it's a bug.

To fix it, I deleted /Library/Preferences/com.apple.keyboardtype.plist and after a reboot, the keyboard assistent popped up. I pressed the key like it says and selected ISO (European) and everything is back to normal.

The problem with fixing this with Ukelele is that it will swap the keys the other way around on your internal keyboard.

4
  • I don't think your fix would have worked for the original poster, as his Input Source preference pane shows he already had ISO as the recognized type. For you I would expect this pane to have shown a layout without the key next to the left shift, which means it was missrecognized as ANSI. Aug 21 '19 at 15:31
  • Hard to say, but it was the same for me; the input sources preference pane looked correct but the keys were swapped. Aug 22 '19 at 10:23
  • 2
    I had the exact same problem as OP with the same keyboard, but on OSX 10.15.2. After reboot keyboard assistent solved the problem! Thank you!
    – illnr
    Jan 30 '20 at 8:11
  • The problem appeared for me the first time under Catalina 10.15... Strange is that I had to apply this "correction" several times as after a while, one day, or early morning, the keyboards suddenly behaved different... very very strange Jun 24 at 23:25
7

You can use Karabiner to swap the keys using the following private.xml.

<?xml version="1.0"?>
<root>
  <item>
    <name>Swap Keys</name>
    <identifier>private.swapkeys</identifier>
    <autogen>__KeyToKey__ KeyCode::one, KeyCode::two</autogen>
    <autogen>__KeyToKey__ KeyCode::two, KeyCode::one</autogen>
  </item>
</root>

You'll need to find the KeyCode for the keys you want to swap as I don't have a German keyboard to check. You can use EventViewer accessible from Karabiner → Misc to find the KeyCodes. Replace one with one KeyCode and two with the other KeyCode in the above private.xml.

1
  • 2
    Karabiner-Elements is the newer and better Karabiner. I also like the new JSON configs more than Karabiner's XML. Aug 21 '19 at 15:37

You must log in to answer this question.

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