Firefox-only keyboard layout glitch

I’m running Koi with the KDE Plasma desktop on a ThinkPad X220T, which I dropped yesterday, possibly triggering keystrokes that caused a very strange issue.

Firefox now only interprets my en-US keyboard input as Inuktitut. That is, it recognizes QWERTY keystrokes but replaces applicable consonants, vowels, and consonant-vowel pairs with their equivalent Canadian Aboriginal Syllabics, such as “ᓕ” for “li”.

This occurs only in Firefox, not other apps (GTK, Qt or otherwise). Based on intuition, I deleted ~/.mozilla, ~/.config/mozilla, and .config/gtk-3.0, which did not affect it. This is apparently a rare enough issue that I’ve been unable to find other reproductions of it, so I thought I’d ask here.

1 Like

This occurs only in Firefox, not other apps (GTK, Qt or otherwise). Based on intuition, I deleted ~/.mozilla, ~/.config/mozilla, and .config/gtk-3.0, which did not affect it. This is apparently a rare enough issue that I’ve been unable to find other reproductions of it, so I thought I’d ask here.

Does it at least stop if you create a new user?

Does it at least stop if you create a new user?

Yes, and presumably it would also stop if i completely removed and rebuilt my own NixOS user profile. I’d prefer not to, but more importantly, I’d like to know exactly what caused it. I have use for multiple input methods, but if they are activated by a mechanism I’ve never heard of, they become much less useful to me.

I’d prefer not to, but more importantly, I’d like to know exactly what caused it.

I appreciate the approach (I also like knowing what the hell is going on on my system). I just wanted to make sure the amount of mystery is limited.

Do I understand correctly that in Firefox belonging to the empty user launched inside your user session you get normal input?

I would try copying entire .config to the empty user (and chowning as needed, of course), then the same with .local, then just with random subsets of dotfiles… It might be that bisecting the relevant dotfiles is feasible and not too hard (if you are lucky).

2 Likes

I found it. Here was the contents of ~/.config/plasma-local-settings.sh:

# Generated script, do not edit
# Exports language-format specific env vars from startkde.
# This script has been generated from kcmshell5 formats.
# It will automatically be overwritten from there.
export LANG=iu_CA.UTF-8

This was, of course, completely unrelated to dropping my computer. It was generated by KDE System Settings when regional formats were selected. The fact that this file sets $LANG, which has broad (and apparently very inconsistent) implications on Linux software language support, is completely unclear from the setting that generates it, and this is apparently a known issue ^1 ^2, relating to KDE 5’s switch from KLocale to QLocale. Seeing as this problem is as old as KDE 5, it looks like it might be quite some time until it’s fully addressed to everybody’s satisfaction. :sweat:

At the very least, now that I know the source of the issue, I’m able to configure my desktop to my liking by selecting individual format locales from within the Formats pane of System Settings i.e. Numbers, Time, Currency, Measurement, and Collation, (which repectively affect $LC_NUMERIC, $LC_TIME, $LC_MONETARY, $LC_MEASUREMENT, and $LC_COLLATE) leaving the Region set to my native language.

Perhaps this will help somebody else with a similar problem.

3 Likes

Oh interesting. Great debugging success! Thanks for sharing.

Thank goodness, because the next step would have been to drop the laptop again to see if that would fix it! :rofl:

4 Likes