Backquote (<) and ² inverted on my external keyboard

Solution 1:

I've got the same problem on an external Italian Keyboard, as said in the comments by Tom Gewecke the problem was Karabiner.

I want to maintain Karabiner for one of the two keyboards so I've done a "simple modification":

enter image description here

You can do the same with your inverted keys.

Another solution of the problem is disable Karabiner for a specific Keyboard:

enter image description here

Solution 2:

I noticed these keys are swapped on my (Belgian) AZERTY keyboard when the keyboard type is set to ANSI (United States and others) instead of ISO (European). You can change this setting by going to the Keyboard tab of the Keyboard preferences and clicking Change Keyboard Type....

enter image description here

Solution 3:

You should give use more information about your external keyboard mapping. Your are only talking about 2 specific keys. That special keys can have different location with respect to your keyboard layout (and brand).

I would say that you have an AZERTY based mapping but where ² and < are inverted : AZERTY MAPPING

Solution on macOS 10.12

The best way is:

  • go in System preferences > keyboard.
  • click Input Sources tab (4th tab on macOS if you're OS is not in English).
  • then click on the "+" button at the bottom left of the window for adding a new layout.
  • browse the AZERTY mapping and try to find which one corresponds to yours.
  • tick "Show input in the menu bar" (bottom of the window, first option), it let you see you current mapping in your OS menu bar. You should see appear here a country flag or "ABC" or "ABC - AZERTY" or something else depending of your chosen layouts. enter image description here enter image description here

If your external keyboard has an unusual mapping, you have to try manually several kinds of layouts (ex: french/canadian french/swiss french).

  • Select the new added layout in the menu bar,
  • open a text editor to try if your software mapping corresponds to your physical mapping.
  • You should find the good one easily after few attempts.

If you can't find it

  1. A straightforward solution (if physical keys are similar) is to swap them physically.
  2. There is a way to write your own mapping configuration file on an Unix system, but we can talk about that only if nothing goes right.

Trick

An easy way for switching your layout whether you are using your laptop or ext. keyboard is to add a shortcut for making the switch:

  • go in System preferences > keyboard.
  • click "Shortcuts" tab (3rd tab).
  • select "Input Sources" in the left panel.
  • then add your special shortcut. enter image description here