Keyboard layout changes in some applications when pressing the Ctrl key

Hi all,

I have a couple of laptop machines running Debian 11 with Gnome Shell (3.38.6-1~deb11u1). Default keyboard layout during installation was “French (legacy, alt.)” azerty (the hardware layout of the keyboards on the laptops).
I have set up an alternate keyboard layout via the Gnome settings because I generally use my machines with an external keyboard with a bépo layout (plus a few others because I sometimes need other layouts):

$ gsettings get org.gnome.desktop.input-sources sources
[('xkb', 'fr+latin9'), ('xkb', 'fr+bepo'), ('xkb', 'us+dvorak'), ('xkb', 'us+dvorak-intl'), ('xkb', 'us+dvorak-alt-intl'), ('xkb', 'fr+bepo_afnor'), ('xkb', 'fr+bepo_latin9')]

There are a few other layouts too but the problem occurs even when I only have the fr+latin9 and fr+bepo layouts. It occurs the same way on both my laptops running this setup so it’s not specific to something I did in one of the setups.

The problem I encounter is that the keyboard is not recognized as bépo all the time.

When I boot up the machine, it is seen as azerty. Then upon first login, it’s still azerty. These two are a bit annoying but they only happen once after having booted, that’s not too problematic.

Once logged in however, it switches to bépo in all applications / contexts except, and that’s the really weird bit, in some applications where it switches back to azerty when I press the Ctrl key (and only then).

That really throws me off because the A in bépo is where the Q is in azerty and I keep pressing Ctrl-Q when trying to select text which doesn’t produce the desired effect…

So far, I have identified that the following applications display this behavior:

  • Files (3.38.2-stable)
  • Gnome terminal (3.38.3)
  • Gedit (3.38.1)

There could be others but I haven’t identified them yet. Firefox doesn’t do this, neither Libreoffice, Slack or Vscodium.

I don’t know if this is a known bug, I couldn’t find anything about it, whether it could be something due to the way keyboard layouts are handled by Gnome Shell or possibly by Debian and if it can be corrected.
It is particularly the case where pressing Ctrl modifies the layout which really bothers me, I can live with the others.

Is it just a configuration I have missed (but why would setting the keyboard layout via the desktop settings not do all the job?), is there a trick to prevent this behavior?


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