Wrong keyboard layout on most applications after fresh install

Hello Everyone,
after installing Leap 15.6, I am facing a problem I have never encountered before (neither on Tumbleweed with KDE Plasma nor on Leap 15.5 with XFCE).
KDE is my DE.

I am using a mechanical keyboard with a US layout:
During the setup and the installation I selected the German Keyboard layout (I am used to this one, and the manufacturer didn’t sold the right layout, so I had no other choice). This one works normally and as usual in KDE itself.

When opening applications, things are getting difficult:
On my browser, the layout is fine (I am not using the default Firefox browser).
On LibreOffice, the layout is correct.

On nearly all other applications, the natively used layout is the US layout, even if I never selected nor installed it.

I tried to debug it a little the result of: locale -a
gives me:

aa_DJ
aa_DJ.utf8
aa_ER
aa_ER@saaho
aa_ET
af_ZA
af_ZA.utf8
agr_PE
ak_GH
am_ET
an_ES
an_ES.utf8
anp_IN
ar_AE
ar_AE.utf8
ar_BH
ar_BH.utf8
ar_DZ
ar_DZ.utf8
ar_EG
ar_EG.utf8
ar_IN
ar_IQ
ar_IQ.utf8
ar_JO
ar_JO.utf8
ar_KW
ar_KW.utf8
ar_LB
ar_LB.utf8
ar_LY
ar_LY.utf8
ar_MA
ar_MA.utf8
ar_OM
ar_OM.utf8
ar_QA
ar_QA.utf8
ar_SA
ar_SA.utf8
ar_SD
ar_SD.utf8
ar_SS
ar_SY
ar_SY.utf8
ar_TN
ar_TN.utf8
ar_YE
ar_YE.utf8
as_IN
ast_ES
ast_ES.utf8
ayc_PE
az_AZ
az_IR
be_BY
be_BY@latin
be_BY.utf8
bem_ZM
ber_DZ
ber_MA
bg_BG
bg_BG.utf8
bhb_IN.utf8
bho_IN
bho_NP
bi_VU
bn_BD
bn_IN
bo_CN
bo_IN
br_FR
br_FR@euro
br_FR.utf8
brx_IN
bs_BA
bs_BA.utf8
byn_ER
C
ca_AD
ca_AD.utf8
ca_ES
ca_ES@euro
ca_ES.utf8
ca_ES@valencia
ca_FR
ca_FR.utf8
ca_IT
ca_IT.utf8
ce_RU
chr_US
ckb_IQ
cmn_TW
crh_UA
csb_PL
cs_CZ
cs_CZ.utf8
C.utf8
cv_RU
cy_GB
cy_GB.utf8
da_DK
da_DK.utf8
de_AT
de_AT@euro
de_AT.utf8
de_BE
de_BE@euro
de_BE.utf8
de_CH
de_CH.utf8
de_DE
de_DE@euro
de_DE.utf8
de_IT
de_IT.utf8
de_LI.utf8
de_LU
de_LU@euro
de_LU.utf8
doi_IN
dsb_DE
dv_MV
dz_BT
el_CY
el_CY.utf8
el_GR
el_GR@euro
el_GR.utf8
en_AG
en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.utf8
en_GB
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE@euro
en_IE.utf8
en_IL
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SC.utf8
en_SG
en_SG.utf8
en_US
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.utf8
en_ZM
en_ZW
en_ZW.utf8
eo
es_AR
es_AR.utf8
es_BO
es_BO.utf8
es_CL
es_CL.utf8
es_CO
es_CO.utf8
es_CR
es_CR.utf8
es_CU
es_DO
es_DO.utf8
es_EC
es_EC.utf8
es_ES
es_ES@euro
es_ES.utf8
es_GT
es_GT.utf8
es_HN
es_HN.utf8
es_MX
es_MX.utf8
es_NI
es_NI.utf8
es_PA
es_PA.utf8
es_PE
es_PE.utf8
es_PR
es_PR.utf8
es_PY
es_PY.utf8
es_SV
es_SV.utf8
es_US
es_US.utf8
es_UY
es_UY.utf8
es_VE
es_VE.utf8
et_EE
et_EE.iso885915
et_EE.utf8
eu_ES
eu_ES@euro
eu_ES.utf8
fa_IR
ff_SN
fi_FI
fi_FI@euro
fi_FI.utf8
fil_PH
fo_FO
fo_FO.utf8
fr_BE
fr_BE@euro
fr_BE.utf8
fr_CA
fr_CA.utf8
fr_CH
fr_CH.utf8
fr_FR
fr_FR@euro
fr_FR.utf8
fr_LU
fr_LU@euro
fr_LU.utf8
fur_IT
fy_DE
fy_NL
ga_IE
ga_IE@euro
ga_IE.utf8
gd_GB
gd_GB.utf8
gez_ER
gez_ER@abegede
gez_ET
gez_ET@abegede
gl_ES
gl_ES@euro
gl_ES.utf8
gu_IN
gv_GB
gv_GB.utf8
hak_TW
ha_NG
he_IL
he_IL.utf8
hif_FJ
hi_IN
hne_IN
hr_HR
hr_HR.utf8
hsb_DE
hsb_DE.utf8
ht_HT
hu_HU
hu_HU.utf8
hy_AM
hy_AM.armscii8
ia_FR
id_ID
id_ID.utf8
ig_NG
ik_CA
is_IS
is_IS.utf8
it_CH
it_CH.utf8
it_IT
it_IT@euro
it_IT.utf8
iu_CA
ja_JP.eucjp
ja_JP.shiftjisx0213
ja_JP.sjis
ja_JP.utf8
kab_DZ
ka_GE
ka_GE.utf8
kk_KZ
kk_KZ.utf8
kl_GL
kl_GL.utf8
km_KH
kn_IN
kok_IN
ko_KR.euckr
ko_KR.utf8
ks_IN
ks_IN@devanagari
ku_TR
ku_TR.utf8
kw_GB
kw_GB.utf8
ky_KG
lb_LU
lg_UG
lg_UG.utf8
li_BE
lij_IT
li_NL
ln_CD
lo_LA
lt_LT
lt_LT.utf8
lv_LV
lv_LV.utf8
lzh_TW
mag_IN
mai_IN
mai_NP
mfe_MU
mg_MG
mg_MG.utf8
mhr_RU
mi_NZ
mi_NZ.utf8
miq_NI
mjw_IN
mk_MK
mk_MK.utf8
ml_IN
mni_IN
mn_MN
mnw_MM
mr_IN
ms_MY
ms_MY.utf8
mt_MT
mt_MT.utf8
my_MM
nan_TW
nan_TW@latin
nb_NO
nb_NO.utf8
nds_DE
nds_NL
ne_NP
nhn_MX
niu_NU
niu_NZ
nl_AW
nl_BE
nl_BE@euro
nl_BE.utf8
nl_NL
nl_NL@euro
nl_NL.utf8
nn_NO
nn_NO.utf8
no_NO
no_NO.utf8
nr_ZA
nso_ZA
oc_FR
oc_FR.utf8
om_ET
om_KE
om_KE.utf8
or_IN
os_RU
pa_IN
pap_AW
pap_CW
pa_PK
pl_PL
pl_PL.utf8
POSIX
ps_AF
pt_BR
pt_BR.utf8
pt_PT
pt_PT@euro
pt_PT.utf8
quz_PE
raj_IN
rif_MA
ro_RO
ro_RO.utf8
ru_RU
ru_RU.koi8r
ru_RU.utf8
ru_UA
ru_UA.utf8
rw_RW
sah_RU
sa_IN
sat_IN
sc_IT
sd_IN
sd_IN@devanagari
se_NO
sgs_LT
shn_MM
shs_CA
sid_ET
si_LK
sk_SK
sk_SK.utf8
sl_SI
sl_SI.utf8
sm_WS
so_DJ
so_DJ.utf8
so_ET
so_KE
so_KE.utf8
so_SO
so_SO.utf8
sq_AL
sq_AL.utf8
sq_MK
sr_ME
sr_RS
sr_RS@latin
ss_ZA
st_ZA
st_ZA.utf8
sv_FI
sv_FI@euro
sv_FI.utf8
sv_SE
sv_SE.utf8
sw_KE
sw_TZ
syr
szl_PL
ta_IN
ta_LK
tcy_IN.utf8
te_IN
tg_TJ
tg_TJ.utf8
the_NP
th_TH
th_TH.utf8
ti_ER
ti_ET
tig_ER
tk_TM
tl_PH
tl_PH.utf8
tn_ZA
to_TO
tpi_PG
tr_CY
tr_CY.utf8
tr_TR
tr_TR.utf8
ts_ZA
tt_RU
tt_RU@iqtelif
ug_CN
uk_UA
uk_UA.utf8
unm_US
ur_IN
ur_PK
uz_UZ
uz_UZ@cyrillic
uz_UZ.utf8
ve_ZA
vi_VN
wa_BE
wa_BE@euro
wa_BE.utf8
wae_CH
wal_ET
wo_SN
xh_ZA
xh_ZA.utf8
yi_US
yi_US.utf8
yo_NG
yue_HK
yuw_PG
zh_CN
zh_CN.gb18030
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.utf8
zh_SG
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.utf8

And cat ~/.config/plasma-localerc

gives me:

[Formats]
LANG=de_DE.UTF-8

Do you have any idea how I can fix this, what the problem might be? I am a bit cautious to change any config file, that’s why I dared to ask here first. I also might not be the only one with this problem.

This is unclear to me. Has the keyboard a US layout or a German layout?

BTW, this is about the layout of the keyboard and has nothing to do with locale or LANG . Those are only influencing output (like language chosen for messages, date formatting, formatting of numbers, etc.).

Isa this related to this one: Yast uses wrong keyboard language for keyboard ?

Yes, it is the same problem, however, I did not selected “english” during the SUSE install, I did select German for the installing language and “German” for the keyboard layout.

Sorry if I was unclear so:

I did select the “German” language and “Swiss-German Keyboard layout” during the install - while I myself am typing on a keyboard with a US layout.

Now nearly every application I am using, is taking the wrong keyboard layout (the US one) as the default layout, even if I did not choose any “English” language or layout on the installer.

I did not notice, that yast is also using the US keyboard-layout as default.
Nearly all my applications are using the US layout as the default keyboard, the only one that do not are my browser, my terminal and Libreoffice (those are using the correct one, the german keyboard-layout).

I already checked in the KDE “language & region” settings: there, German is selected as default. In the “Input devices” - " keyboard" settings, the default keyboard is selected and there is the test space to use your keyboard, and in the test space it is working as intended, it is writing with the German layout.

One other thing, that seems weird to me, is that under the “Language & Region” - “Typing Correction” settings, there are two options I can choose from: “German” and “American English (USA)” . However, this has never happened during any other install before.

When I selected the “German” language and “Swiss-German” Keyboard layout during the installation, it never installed any side language and there weren’t any other options to choose from in KDE (and in FXCE neither), only German.

I can only repeat what I tried to explain above. The choice of language has nothing to do with your keyboard layout. All the settings about language & region and the like, if on the system level or on the desktop level of a user, have nothing to do with your keyboard layout. All these setting work on the output site.

You keyboard is independent from this. You have a keyboard with a specific layout. It is bought with that layout. It is hardware. And you tell the system what hardware keyboard you have so it can interpret the key you hit on the board and translate it into the correct internal representation. You can type any language on your keyboard you want (as long as the characters you need are there). The keyboard is language agnostic. I have for example here a US keyboard and I type now English, but I can also type Dutch: het type toetsenbord heeft niets te doen met de taal die ik gebruik. Or German: Wenn du ein Schweizerdeutche Tastatur hast, sollst du das dem System zuführen. Wennn du ein US Tastatur hast sollst du das dem System zuführen. Du sollst dein System nicht vorlügen. Die Hardware ist wie sie ist. (Ich muß aber auf meinem US Tastatur bestimmte Tricks machen um die Umläute zu kriegen, aber dabei ändert sich die Hardware nicht).

Yes, I get that. But it doesn’t explain, why this problem comes up in the first place and never did come up before.

I really never had this problem, and used exactly the same install steps as I usually do.

I understand that I shouldn’t “lie” to my system, but not having the keys at the right place (for example the ¨ and the and nearly every other key is a no no for me, because i have to type quite a lot and in two different languages - french and german). Of course, I could have installed the system while selecting “US” keyboard, and then change it afterwards in KDE itself, but I didn’t do it because I might mess up with my passwords if I did during the installation (since it wouldn’t be the layout I am used to and special characters get messed up quite easily) and I also never had this problem happen to me at all.

Nice you now understand that meddling with locale and language settingwill not help with your problem. Then we can try to concentrate on the problem itself.

It is still not cleat to me what the hardware keyboard is you have. Is it Enslish (US) or is it Deutsch (Schweiz)?
I hope you now understand it can only be one and that you should tell the system the truth.

No need to use this tone, I didn’t do anything to you, and didn’t mean to offend you in any way :no_mouth: :face_with_raised_eyebrow: .
And why bash on me if I never had this problem before - how was I supposed to know, I would have one by selecting the steps I usually select without having any problem?

My hardware keyboard is: a mechanical Keyboard with the US layout.

I am only trying to make clear you were on the wrong path searching for a solution. As, after my first post above, you still were looking at output influencing settings, I tried to make myself more clear (because I apparently failed the first time). Nothing more, nothing less.

Then you will not be surprised that my advice is to declare it as such to your system at installation (or correct it using YaST > Hardware > Keyboard). When you did otherwise earlier, that then IMHO was wrong. That it then worked to your satisfaction, does not make it correct and sooner or later it might backfire. And it seems to me that that is now.

I am still on KDE 5 (and Leap 15.5, will not change for several month until all dust settles down) and thus can not say what and how the KDE Settings offer the end-user to mimic other keyboard layouts on the hardware for use.

As said, I mainly tried with my post to avoid you searching in the wrong way and thus getting more and more confused.

So, what I did now is:

Yast Keyboard - Select the English US Keyboard

It works fine now - the US keyboard is used as standard everywhere.

How can I now add another language that will be used by all applications? Is this possible? I still would like to use my keyboard as a Swiss-German Keyboard.

If I go to - the “keyboard-layout” settings in KDE and add: German (swiss),
The terminal and the system applications are now using the Swiss German keyboard while the other application are still US keyboard now (it is just as before changing the yast settings).

To me it looks as if not all applications (the non-KDE ones) follow this KDE setting. Are you having the same impression?

What I do not quite understand and where you could help me getting a better idea, is how you can use a US keyboard for another layout. Does this mean that when you type certain keys you get a different character then is shown on the key itself? And is in fact this Deutsch (Schweiz) layout using the same key, only with different characters as result. I ask because some of these hardware keyboards have a different place of keys throughout, not only the same configuration but with different outcome when pressed. See the very long Keyboard layout - Wikipedia

Yes.

Exactly: I know the letters by heart anyway and there are only two letters changing places: z and y.

And The main big differences are the special characters like ä-ö-à-é-è which are all next to the Enter and backspace anyway. That’s how I always have used the keyboard since I got it, and while I had to get used to it, it works fine for me now.

I understand that. I use the Compose key for those (Compose-"-o for ö and Compose-'-e for é, etc.) and that has also grown into my fingers.

I assume the question is now, why in KDE 5 “foreign” applications like Firefox did follow the KDE setting of the keyboard layout, while in KDE 6 this is not the case.

While it could be that someone here might come with a reason (and maybe even a solution). it might be useful to also ask on the KDE forums https://discuss.kde.org/ or even on their Bugzilla https://bugs.kde.org/

Here’s what my dad did, when he could not get a keyboard with German layout ( as he was used to a German typewriter: with my help he set it to be a German layout keyboard by default, then with a red waterproof marker he drew the chars on the keycaps. Later I brought him a nice IBM German Layout keyboard, and guess what? He again used a marker to add the US layout.
BTW, never got him to using the compose key, which I do like @hcvv does. ♪♫

Yes, that’s what I’ll get used to then, thank you for your help nonetheless! (I already typed every y wrong, it will take some time to get used to).

I might open a ticket there but for now I have too much to do and I already lost some time on this, so probably not right now. If I find a solution I’ll post it here too (and in the other thread which seems to have a similar problem).

I have exactly the same issue. Some apps have stricly US_EN keyboard layout and it cannot be changed. I thought this is related to the applications from non openSUSE repos, in my case vscode and yandex browser, however I have DBeaver also, and that application works fine.

Hey, we’ve a very similar issue with 15.6 on our migration test computers (regardless if it is a fresh install or a migrated system).

The default desktop is Gnome and users are able to hot-swap between an EN/DE keymap on the top-right menu in Gnome. Regardless of the chosen keymap, GTK applications doing the right thing while QT applications like Zotero, Slack, Signal, Google Chrome Browser etc. defaulting to English until we fix it with yast or setxkbmap in a temporary manner. But this is not reboot resilient.
Of course, if I opt inside Gnome an EN keymap afterwards, the DE keymap is still set on QT. It seems like a synchronization issue in dependency to Wayland.
Opting for Gnome on Xorg at login and the keymap swap between EN/DE is in sync like it was with Leap 15.5.

Temp. help:

# As user:
setxkbmap -layout de

# Or choose Gnome/KDE-Xorg rather than Wayland on login screen

Has a bug already been reported?

Hello, I had two accounts, one showing the behaviour you mention and one not.
The difference (and solution for the misssbehaving account) was a line in .bashrc:

export QT_QPA_PLATFORM=wayland

Then logout and login again.

Best regards,

George

1 Like

Very interesting @gskillas. In our situation your way works in Calligra Words for example, but not in VLC, Slack, Zoom, Zotero, Google Chrome, or Signal for example. I know, some of my examples are not in the official repositories therefore lets talk about VLC…

What’s the difference in terms of QT/Wayland between Calligra Word and VLC then?
Whats the difference to Leap 15.5 where this wasn’t an issue?