0

In Ubuntu 22.04, I changed two keys in /usr/share/X11/xkb/symbols se

After a reboot, the keys got remapped correctly. But after a second reboot, it seems my entire numeric row has changed functionality. I think the US layout is chosen, even though it seems it isn't.

In /var/lib/xkb there is only one file: README.compiled

Ctrl and Shift seem to work like before, but L-Alt and R-Alt now seem to function like the same key and with changed behaviour. Alt+Gr or R-Alt used to return a paragraph when combined with section key that is to the left of 1. But now, pressing Alt+Gr changes window focus.

cat /etc/default/keyboard returns

XKBLAYOUT="se,ru"
XKBVARIANT=","
BACKSPACE="guess"
XKBMODEL="pc105"
XKBOPTIONS="lv3:ralt_switch,grp_led:scroll"

Shift+0 should return = but instead returns )

Shift++ should return ? but instead returns _

Pressing User + Space (my version of Alt + Space) to change to Cyrillic Russian keyboard does nothing. The system says that the keyboard is switched to the other language, but I cannot type anything in Russian.

My only remaining guess is that I edited more than I thought in /usr/share/X11/xkb/symbols se, but I cannot see how that would do these changes.

Using sudo dpkg-reconfigure keyboard-configuration and then rebooting changed nothing.

No startup applications has been added during this.

System keyboard settings still shows Swedish Russian

How can I undo this change?

EDIT

gsettings get org.gnome.desktop.input-sources sources

returns

[('xkb', 'se'), ('xkb', 'ru')]

and

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

returns

['grp_led:scroll']

Changing language at top right in menu bar is possible, but the changes have no effect. The same keys are shown regardless if lang = ru or lang = se

EDIT 2

Reset changes with Gunnar's help:

sudo apt reinstall xkb-data

The reset helped to revert the changes.

However, I still face the problem that the layout seems to change when I try to change keybindings.

I tried creating a new layout instead of changing the current one by following this thread.

I managed to create a copy of my keys but after two reboots the entire layout changes to an us one.

Update

Tried following this tutorial. The changes made to

/usr/share/X11/xkb/symbols se
/usr/share/X11/xkb/rules evdev.lst
/usr/share/X11/xkb/rules evdev.xml
/usr/share/X11/xkb/rules base.lst
/usr/share/X11/xkb/rules base.xml

remain after several reboots. The unwanted to switch to us-layout only happens after at least two reboots. However, now the reset doesn't help. The unwanted changes persist after sudo dpkg-reconfigure keyboard-configuration and a reboot.

I fount this in my system settings for keyboard now when I pressed View Keyboard Layout for the Swedish keyboard. It is not a Swedish keyboard layout. It looks like the typical us keyboard, no? Displaying the same window for the Russian keyboard shows Cyrillic, but I cannot type anything in Russian despite this.

Noticed I could do sudo setxkbmap and sudo setxkbmap -layout for us and ru, but not for se, which returned this error: Error loading new keyboard description

Using sudo apt install --reinstall xkb-data helped reset everything so that I at least can do sudo setxkbmap se

Pompan
  • 3

0 Answers0