Score:1

How can I change Super key's function back to its original on Ubuntu 22.04?

il flag

While I was doing the Ubuntu 20.04-->22.04 system upgrade, I accidentally set my Super key as the one for changing keyboard layout. Now it is in conflict with every other shortcut containing Super and despite searching for a solution for a couple of hours, I did not find any ways to change it back.

/etc/default/keyboard file:

XKBLAYOUT="hu,gb,fr,ru,rs,gr,se"
XKBVARIANT=",,azerty,legacy,alternatequotes,polytonic,"
BACKSPACE="guess"
XKBMODEL="pc105"
XKBOPTIONS="grp:lwin_toggle,grp_led:scroll"

When I check it by xev it prints out this (I normally use Ctrl+Space to change keyboard layout and it prints out a very similar thing):

FocusOut event, serial 37, synthetic NO, window 0x4600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x4600001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  127 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           32  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 37, synthetic NO, window 0x4600001,
    root 0x792, subw 0x0, time 27670707, (786,460), root:(898,562),
    state 0x4010, keycode 133 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

ClientMessage event, serial 37, synthetic YES, window 0x4600001,
    message_type 0x171 (WM_PROTOCOLS), format 32, message 0x16f (WM_DELETE_WINDOW)

EDIT: After sudo dpkg-reconfigure keyboard-configuration my /etc/default/keyboard file is this:

XKBLAYOUT="hu"
XKBVARIANT=""
BACKSPACE="guess"
XKBMODEL="pc105"
XKBOPTIONS=""

Now my AltGr functions like an Alt.

Command gsettings get org.gnome.desktop.input-sources xkb-options:

['grp:lwin_toggle', 'grp_led:scroll', 'lv3:ralt_alt', 'compose:menu']

Score:0
uz flag

You can run this command:

sudo dpkg-reconfigure keyboard-configuration

It should give you an opportunity to change it (or even better unset it, because such a thing is more easily handled via user settings rather than system settings).

To clean up your user settings you should also run this command:

gsettings reset org.gnome.desktop.input-sources xkb-options

Finally use Tweaks to pick Ctrl+Space for the purpose again.

petyanszky avatar
il flag
Unfortunately, neither of these worked :( Super still keeps changing the layout.
Gunnar Hjalmarsson avatar
uz flag
@petyanszky: I still see `grp:lwin_toggle` in the output of the gsettings command. That's why.
petyanszky avatar
il flag
Okay, I've just deleted that, and it's working now! Thank you **very** much! :)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.