Issues with changing keyboard layouts

I’ve installed EndevourOS with budgie and select RU locale on installation but entered password on EN. When startup I can’t enter my password because Alt+Shift didn’t work and en locale didn’t installed.
I added en locale via console (Ctrl+Alt+F2) and changed /etc/default/keyboard.

After this I entered Budgie and I can’t change locale using Alt+Shift. In Settings it didn’t recognize Alt+Shift. Now using Ctrl+Space.

I tried check events:

xev -event keyboard | grep -oE "\(keysym .*\)|keycode [0-9]* "

After this I pressed twice Alt+Shift and twice Shift+Alt and I didn’t get ISO_Next_Group:

keycode 64 
(keysym 0xffe9, Alt_L)
keycode 64 
(keysym 0xffe9, Alt_L)
keycode 64 
(keysym 0xffe9, Alt_L)
keycode 64 
(keysym 0xffe9, Alt_L)
keycode 50 
(keysym 0xffe1, Shift_L)
keycode 50 
(keysym 0xffe1, Shift_L)
keycode 50 
(keysym 0xffe1, Shift_L)
keycode 50 
(keysym 0xffe1, Shift_L)

What I have in my configs:

>cat /etc/default/keyboard
XKBMODEL="pc105"
XKBLAYOUT="us,ru"
XKBVARIANT="qwerty"
XKBOPTIONS="grp:alt_shift_toggle"

BACKSPACE="guess"

>gsettings get org.gnome.desktop.input-sources sources
[('xkb', 'ru'), ('xkb', 'us')]

>localectl status
System Locale: LANG=ru_RU.UTF-8
    VC Keymap: ru
   X11 Layout: ru,us
    X11 Model: pc105
  X11 Variant: qwerty
  X11 Options: grp:alt_shift_toggle

>cat /etc/vconsole.conf
KEYMAP=ru

>cat /etc/X11/xorg.conf.d/00-keyboard.conf
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "ru,us"
	Option "XkbModel" "pc105"
        Option "XkbVariant" "qwerty"
        Option "XkbOptions" "grp:alt_shift_toggle"
EndSection

> gsettings get org.gnome.desktop.wm.keybindings switch-input-source
['<Primary>space']

>cat /etc/locale.gen | grep -v \#
en_US.UTF-8 UTF-8  
ru_RU.UTF-8 UTF-8 

>cat /etc/locale.conf
LANG=ru_RU.UTF-8
LC_ADDRESS=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_MONETARY=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_NUMERIC=ru_RU.UTF-8
LC_PAPER=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8

Do you mean you couldn’t change this?:

Xorg uses /etc/X11/xorg.conf.d/00-keyboard.conf, better modified using localectl with options.

I would generally suggest setting us layout first.
Also, you may add a second layout in vconsole. Example:

FONT=<your prefered font, like eurlatgr>
KEYMAP=us
KEYMAP_TOGGLE=ru
1 Like

Yes I can’t change this because I haven’t event on Alt+Shift. It seems like some thing catch this event before. When I pressed Alt+Shift active window becomes inactive, and after releasing it becomes active again.

Thx, now I have:

>localectl status
   System Locale: LANG=ru_RU.UTF-8
       VC Keymap: us
VC Toggle Keymap: ru
      X11 Layout: us,ru
       X11 Model: pc105
     X11 Variant: qwerty
     X11 Options: grp:alt_shift_toggle

> cat /etc/vconsole.conf
FONT=eurlatgr
KEYMAP=us
KEYMAP_TOGGLE=ru

But it didn’t help to change switch locale combination to Alt+Shift

1 Like

Try changing this to LeftAlt_LeftShift

grp:lalt_lshift_toggle

Off topic: Extra options, if you like them:

X11 Options: terminate:ctrl_alt_bksp,grp:lalt_lshift_toggle,grp_led:scroll

Ctrl+Alt+Backspace is emergency rescue/escape, killing a hung Xorg
grp_led:scroll lights up the ScrollLock LED when switching to the secondary kbd layout :wink:

1 Like

It’s not help too… In xev I didn’t have any event

Thx it’s cool feature. Except grp_led becouse I didn’t have this led :grinning:

Can it be any conflicts with budgie? May be I need to use another DM?
I will try clean install :grinning:

1 Like

It could be.
Check this for example and maybe ask them for advice.

1 Like

I did clean install with xfce but it have same problem. So I reinstall with budgie again :smile:

What I found:
In xorg-xev when I pressed Alt+Shift got a strange thing:

#HERE I PRESSED ALT
KeyPress event, serial 38, synthetic NO, window 0x4000001,
    root 0x845, subw 0x0, time 1269250, (384,87), root:(434,165),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

#HERE I PRESSED SHIFT
FocusOut event, serial 38, synthetic NO, window 0x4000001,
    mode NotifyGrab, detail NotifyAncestor

#HERE I RELEASED SHIFT
FocusIn event, serial 38, synthetic NO, window 0x4000001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 38, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

#HERE I RELEASED ALT
KeyRelease event, serial 38, synthetic NO, window 0x4000001,
    root 0x845, subw 0x0, time 1273343, (384,87), root:(434,165),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

When I pressed Alt+Shift windows received a FocusOut event.
What else I can check?

Your focus is shifting away of the issue… :grin: xev is listening to Xorg, which includes several things other than key presses. Focus is not relevant to keyboard press combinations. :person_shrugging:

Doing a system re-installation when facing a keyboard shortcuts issue sounds like too much of a reaction :worried: . Whatever…

Keyboard shortcuts and layout switching have to do with Xorg and the Desktop Environment.
If you stick to Budgie, I suggest you ask their support for an answer. They know better.
Since Budgie is almost Gnome, why don’t you install Gnome and try out?

Gnome, XFCE and Plasma have a very wide user and developer base, that would have found a solution to any important issue like switching keyboard layout.
WMs, like i3, bspwm etc. are also cleaner to control such an issue, if you like WMs.

Anyway, I have no better idea. Hmmm…

Are you sure your hardware is not failing? :rofl:
Can you test other languages for layout?
Is it possible you have set Alt key as the main Modifier key in settings?

But in Xfce I have same problem. May be need to write them both? :smile:

Now I’m not sure :smile: I using Asus fx505du. In Arch wiki I didn’t found info about this bugs only for keyboard backlight (On endeavouros brightness working without any tweaks :+1:)
In Windows 11 all working fine. And during installation EndeavourOS it working too…
EndearvourOS using XFCE during install. So I tried install XFCE but still have this bug.

I tried set us,fr in localectl but Budgie not recognize it, so I add it in budgie settings and it works but without Alt+Shift :smile:

How I can check this? It’s clean install OS… I thought I hadn’t broken anything yet… :smile:

I assume in Budgie Settings…?
It is usually set to Super, but also Alt is offered and sometimes is default.

You can also try with a new user. Create a new user and login to check.

Gnome and KDE are trustworthy, so you may want to install one or both and check :person_shrugging: :face_with_head_bandage:

1 Like

It set to “Default”, tried set to “Menu” nothing changed :person_shrugging:

Yes, it helped! New user work as expected.
If I clean home path of my current user it helped? Hmm…

Thank you for help!

1 Like

Since this is a fresh installation, differences should not be many. You can use meld to compare folders and files, to see differences and probably find the real problem, but it is not sure, as Gnome (type) uses dbus databases, dconf etc.

1 Like

I removed all config files from home directory, logout and now all working fine!
Thank you again!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.