3

The "International Keyboard" layout from the apple magic keyboard seems to be missing, there is an international layout for UK, but the plain international layout is not there:

English (International, Macintosh) <- missing layout

magic keyboard (international) * This is the layout that is missing

as a reference here are the other macintosh keyboard layouts, whereas the closes keyboard layout is the English (UK, Macintosh) but the shift + 3 combination is incorrect.

English (UK, Macintosh)

English (UK, Macintosh)

  • Shift + 3: should be # but instead is £

English (Macintosh)

English (Macintosh)

  • The keys left of Z should be backquote key and ~
  • The keys left of 1 should be § and ±

English (UK,Intl., Macintosh)

English (UK,Intl., Macintosh)

  • Multiple shift + number keys are incorrect
  • Multiple super + number keys are incorrect

3 Answers3

3

Looks like you need to make the adjustment suggested in this Ask Ubuntu answer. Once you have done that, the English (Macintosh) keyboard layout probably fits your physical keyboard.

Edit:

If editing /etc/default/keyboard proved to not be persistent, the explanation might be that there is only one user on your system and that the change was silently wiped out when you added or removed input sources in Settings.

If you set it by running this command:

gsettings set org.gnome.desktop.input-sources xkb-options "['apple:badmap']"

instead it ought to stay.

(Looks like you hit a known inconsistency where GNOME and XKB don't play well together. That's a bug, and the issue is mentioned in passing in the discussion at bug #1892014.)

2

I feel stupid for not figuring this out myself but here's how to get the English (Macintosh) layout back for your keyboard on Ubuntu 20.04 (late 2020 earlier 2021 since it worked fine earlier in 2020).

[1] Open Settings > Region & Language > Input Sources

[2] On the right under Input Sources click the + icon

[3] Click the ellipsis

[4] Click your preferred language ...

UPDATE FEB 2021

... at this moment it's important to pay attention as it happens so fast you will miss it. Once you've selected your preferred language the list of languages updates and becomes a list of kb layouts. If you close the modal you'll only get the language, but if you scroll down the list you'll see the mac layout.

[5] .. then select "English (Macintosh)" as your preferred layout

[6] You're done

When 20.04 was initially released we had to search for English (Macintosh) after clicking the ellipsis in step [3] above. It seems that keyboard layout is now grouped within the selected keyboard source.

By that I mean after I selected English (Canada) a new list appeared from which I could select a keyboard layout for English (Canada).

ubuntux
  • 381
0

Appending @gunnar-hjalmarsson answer,
switching the <TLDE> and <LSGT> keys in question can be done on kernel level by adjusting iso_layout parameter of hid_apple module:

$ modinfo hid_apple
...
description:    Apple USB HID quirks support for Linux
...
parm:           iso_layout:Swap the backtick/tilde and greater-than/less-than keys. ([-1] = auto, 0 = disabled, 1 = enabled) (int)

By default, it's set to -1 (auto).
In your particular case, setting it to 0 (disabled) would do the job:
"English (Macintosh)" layout will just work, so no XKB config hacks are needed.

PS:
Here is the upstream MR to fix the existing layout:
Apple: fix International English layout

See also the same issue for Russian layout:
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/792

bam
  • 11