I'm on Ubuntu 20.04 with GNOME desktop, and recently I started using an Apple Magic Keyboard (model A1644, international 79-key QWERTY version, with Euro and Pound symbols added to 2- and 3-keys).
After some initial tweaks (see below), everything now almost works as it should. Almost, because pressing Alt-Gr + 2 or Alt-Gr + 3 doesn't produce a Euro or Pound symbol, respectively, but just 2 or 3.
What I already tried:
- Created a file
/etc/modprobe.d/hid_apple.confwith the lineoptions hid_apple fnmode=2 iso_layout=0to get the function keys to behave as such without pressing the fn-key and to get the ~/` key working (see e.g. here: https://help.ubuntu.com/community/AppleKeyboard or https://wiki.archlinux.org/title/Apple_Keyboard). This worked. The reason that I'm mentioning this anyway is because I'm not sure whether this influences any of the other things I tried (the Euro and Pound symbols also didn't work before this change, but still) - Choosing different keyboard layout under settings (GUI)
- Editing
/etc/default/keyboard(see e.g. here: https://www.unixfu.ch/using-apple-mac-keyboard-with-ubuntu/, or https://askubuntu.com/questions/1302185/missing-apple-keyboard-layout-english-international-macintosh, or https://askubuntu.com/questions/843590/key-keycode-49-and-key-keycode-94-are-inverted-on-macbookpro-keyboar/844931#844931) - To help with the above, I checked the available settings/options in
xorg.lst(overwhelming!)
I did manage to get my right Alt-key to behave as Alt-Gr (at least I hope; it stopped behaving as an Alt-key in any case), but so far I'm still unable to produce Euro or Pound symbols.
I'd greatly appreciate any help to resolve this!
EDIT:
Output of setxkbmap -query -v 10 (after returning everything except the Alt-key back to its original value):
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules: evdev
model: pc105
layout: us,us
variant: ,
options: lv3:ralt_switch
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete
symbols: pc+us+us:2+inet(evdev)+level3(ralt_switch)
geometry: pc(pc105)
rules: evdev
model: pc105
layout: us,us
variant: ,
options: lv3:ralt_switch