16

Since I upgraded my MacBook Pro to macOS Sierra, two keys seems to have been switched around in the keyboard when I use my external keyboard.

I use the Spanish ISO layout, and the "º" and "<" keys have been swapped. The laptop's keyboard works fine. I have not fiddled with the keyboard configuration, other than changing to my regional layout and swapping modifier keys (it's a windows keyboard).

It worked flawlessly1 before the upgrade. I know very little of how to troubleshoot macOS, what should I do?

1 I just remembered that, no, it wasn't all that flawless; from time to time the keyboard would stop responding, and I'd have to unplug and plug again. Don't think it's related, but...

PD: It happens with all external Keyboards. Tried with a few. All of them where ISO, and it seems the problem is in macOS treating my ISO keyboards as ANSI; the laptop's internal keyboard is ISO though, and has no issue. I've done a clean install of Sierra, and it's still wrong.

  • 1
    I sounds like your machine thinks the keyboard is ANSI instead of ISO. ANSI keyboards have no key to the left of Z, so < is put at the top left most key. You may need to use Karabiner to fix this. – Tom Gewecke Sep 29 '16 at 13:09
  • 1
    Please specify within your OQ how you swapped your external keyboard modifier keys. I bet the method used may not interoperate friendly with a hidden change in MacOS way to manage keys mapping. – dan Oct 4 '16 at 6:55
  • Have a similar issue with an external USB keyboard in PC-International Layout on macOS Sierra Version is 10.12.1 Beta. I and G keys are switched, A is not working regardless of selected layout or ANSI/ISO. – mxfh Oct 4 '16 at 13:31
  • Are you running beta software like mxfh? – Tom Gewecke Oct 4 '16 at 14:52
  • @danielAzuelos I did it through System Preferences, the official way. – jesusiniesta Oct 24 '16 at 11:50
13

I had the same problem with my keyboard and a German layout. Although I had "German" set up as "System Preferences/Keyboard/Input Source" most of my keys had the wrong mapping. E.g. the key right to the Left Shift Key on my keyboard is "<>" instead it was mapped to "^°".

The problem was that my keyboard was setup as an ANSI-type of keyboard (used in the US). Instead it should have been set up as a ISO-type (used in most european countries).

There are several possible solutions to this mapping problem as described by Tom Gewecke on his Blog.

The fix for this is to run the Keyboard Setup Assistant again. Sometimes there is a button for "Change Keyboard Type" visible in "System Preferences/Keyboard".

If not, you can try trashing the file /Library/Preferences/com.apple.keyboardtype.plist and restarting your machine.

Another possibility may be to open Terminal and type: sudo open /System/Library/CoreServices/KeyboardSetupAssistant.app/Contents/MacOS/KeyboardSetupAssistant

When the Keyboard Setup Assistant appears again after reboot be sure to choose the right type of keyboard - ISO.

If none of that helps follow the above link to Toms post with further options.

  • The only problem is these remedies would normally change the internal keyboard's mapping as well, which "works fine". So you probably need Karabiner which can change the external without messing up the internal. – Tom Gewecke Oct 23 '16 at 16:07
  • Maybe I don't understand the issue here. When I updated to macosx10.12. the Keyboard Setup Assistant run once. It asked me to press the key next to the left shift key and then it asked whether I had a ANSI or ISO type of keyboard. I don't remember my choice then, but it did set up my keyboard as ANSI where it actually is a ISO keyboard. – Mica Oct 24 '16 at 8:46
  • I assume your experience involved just one keyboard, right? The OP has the very strange problem that two keyboards, internal and external, are seen by the OS as being of different types. Normally that's not possible, whatever type is set for the OS applies to all keyboards. – Tom Gewecke Oct 24 '16 at 15:43
  • I think I have the same problem with my Italian external (Apple) keyboard: since I installed Sierra, two keys are swapped ("<" and "\"). Could not fix the problem with any of the above suggestions. Also note that Karabiner does not yet support Sierra. I tried with the new Karabiner-Elements, where the "Devices" tab also allows setting the keyboard type - I tried setting my external keyboard as "ISO", but that didn't solve anything – Maiaux Nov 2 '16 at 10:51
3

I've had to install Karabiner Elements and then change the Keyboard Type (available on the tab Virtual Keyboard) to ISO.

Update (July 2018): After installing a MacOS update (10.13.6) the problem has appeared again. However the latest version of Karabiner Elements (12.1.0) doesn't have the Keyboard Type option anymore. There is a Country Code which was set to '1' when I opened Karabiner. After messing around with this value with no success for a while, I've restarted the Mac, which has fixed the issue.

1

Had a similar issue as described above, resetting the modifier keys helped miraculously. I had switched the Ctrl/Options keys before upgrading to macOS Sierra 10.12.1 Beta.

System Preferences > Keyboard > Modifier Keys... > Restore Defaults

  • My Microsoft Sculpt keyboard had a non-functional 'a' key with the betas. Restore Defaults magically fixed it, thanks! – Jonathan del Strother Oct 12 '16 at 8:34
0

In SystemPreferences->Keyboard->InputSources click the + sign left below, go to Spanish/Español and select it: on the right check if you have selected the correct one (Spanish or Spanish-ISO).

  • 1
    Done, and it is the correct one. I've tried also removing it and adding it again. – jesusiniesta Sep 29 '16 at 15:05
0

In my case the issue seems to have been caused by a utility called Karabiner Elements.

It helps me use the Caps Lock key as an additional Escape key. After uninstalling it I removed /Library/Preferences/com.apple.keyboardtype.plist and restarted the machine. After restart the Keyboard Assistant was able to correctly identify the keyboard.

0

Using a nordic layout (Icelandic), it seems that High Sierra identifies nordic ISO keyboards incorrectly. On my old Logitech Cordless Pro, the right windows key is incorrectly mapped to AltGr (Right alt), and on my new Microsoft Sculpt keyboard, there is no key mapped to the AltGr key.

You must log in to answer this question.

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