1

I used to have a Mac keyboard connected to my Ubuntu PC laptop and therefore I switched the Alt and Win keys to match with a regular PC keyboard. I'm not using this keyboard any longer, but I cannot figure out where this change was made.

/etc/default/keyboard:

XKBLAYOUT="us,us"
BACKSPACE="guess"
XKBVARIANT=",intl"
XKBMODEL="pc105"
XKBOPTIONS="grp_led:scroll"

There is no ~/.Xmodmap file

/usr/share/X11/xkb/symbols/pc isn't changed (according to this)

Gnome System -> Preferences -> Keyboard shows Layout default for all options

hid_apple module isn't loaded

I used to be able to switch back to "PC" mode by issuing the following command, but it's not working on Ubuntu 21.10 anymore. I've just upgraded from Ubuntu 20.04:

setxkbmap -option altwin:swap_lalt_lwin

Where else should I look at?

EDIT:

gsettings get org.gnome.desktop.input-sources xkb-options
['altwin:swap_lalt_lwin']
Raisen
  • 113

1 Answers1

1

Switching the Alt and Super keys is one of the things one can change through XKB options. The line XKBOPTIONS in /etc/default/keyboard sets these systemwide. The Gnome Shell desktop can override that with its own dconf setting in gsettings get org.gnome.desktop.input-sources xkb-options.

The setting is not exposed in the user interface, but is available through the Gnome Tweaks utility, Keyboard tab. You can also use dconf-editor or a gsettings command to access the setting.

By default on Ubuntu, the setting is empty, so you could undo your change with

gsettings reset org.gnome.desktop.input-sources xkb-options
vanadium
  • 88,010