Keyboard mapping incorrect with Plasma 5

I have installed Plasma 5 and used the KDE control panel to set my locale to UK and keyboard layout to “gb” mapping. A preview shows the 2 key to have " when the shift key is is pressed while the has @ *** mapped with the shift modifier. Despite this pressing shift with the 2 key gives me an @ while the shift on the gives me ". Other keys are also wrongly mapped.*****

When I use the localectl command it shows:

System Locale: LANG=POSIX
LC_CTYPE=en_GB.UTF-8
VC Keymap: uk
X11 Layout: gb
X11 Model: pc105
X11 Options: terminate:ctrl_alt_bksp

Is there something else I need to correct the key mapping?

You seem to be using the us keyboard layout instead of gb.

Make sure you use systemsettings5 to configure the keyboard layout (Applications->Configure Desktop, or Settings->Configure Desktop).
Plasma5 does not respect KDE4’s settings.

And the desktop’s settings override the system defaults (set with localectl or YaST). A fresh user account should use them though.

Yes, I wish I had just said that rather than all the bolding and italicising of single characters :shame:

This fixed the problem. I was using the systems settings application from the menu, not realising that this invoked the KDE 4 version.

Many thanks.

Well, systemsettings5 is in the menu as well, but it is in “Settings” as mentioned. In 13.2 it is named “System Settings” though (the upstream name), not “Configure Desktop”.

If you mean the one in the “Favorites” (i.e. the left sidebar in Kicker, or the “Favorites” tab in Kickoff), then this was probably migrated from KDE4. I’d suggest to remove the entry and add the other one from the menu (right-click and select “Add to Favorites”, or just drag it to the favorites).

I’ve also installed 13.2 (Tumbleweed) and I’ve noticed the following:

  • During the installer I set my keyboard layout settings to UK but when typing into the ‘Test Box’ the "@ keys are reversed indicating it’s still in US layout.
  • This issues persists when using any apps within KDE. I’ve checked all the settings for ‘Keyboard Layout’ etc., but everything seems to indicate I’m using UK layout.

I’m new to Linux and I’m sure I’ve checked those settings mentioned in this thread but the problem for me persists - can anyone help me figure this out?

Which one now?
13.2 or Tumbleweed?

Those two are completely separate distributions.

Also, 13.2 still installs KDE4 by default, whereas Tumbleweed uses Plasma5.

and I’ve noticed the following:

  • During the installer I set my keyboard layout settings to UK but when typing into the ‘Test Box’ the "@ keys are reversed indicating it’s still in US layout.
  • This issues persists when using any apps within KDE. I’ve checked all the settings for ‘Keyboard Layout’ etc., but everything seems to indicate I’m using UK layout.

I’m new to Linux and I’m sure I’ve checked those settings mentioned in this thread but the problem for me persists - can anyone help me figure this out?

Well, that’s unrelated to KDE then, but a problem in the installer.

Try to set the keyboard layout again in the installed system, in YaST->Hardware->System Keyboard Layout.
If that doesn’t help, set it in KDE’s settings (“Configure Desktop”->Input Devices->Keyboard->Layouts) instead. Those are user-specific and override the system defaults.

Ah sorry, my bad. I’ve installed Tumbleweed.

Well, that’s unrelated to KDE then, but a problem in the installer.

Yes, that I understand and I’d agree there’s a problem with the installer.

Try to set the keyboard layout again in the installed system, in YaST->Hardware->System Keyboard Layout.

Ok, I doubled checked this setting and it’s set to UK, so it’s not this setting.

If that doesn’t help, set it in KDE’s settings (“Configure Desktop”->Input Devices->Keyboard->Layouts) instead. Those are user-specific and override the system defaults.

Ah, this is the one, although not at first obvious!! I needed to add a layout, which upon doing so showed it using US layout. I removed this and added a UK layout and that has resolved my issue.

As a (Windows) software developer of 25+ years, I’d like to understand the root cause here. Is KDE fighting against the YAST settings? If this was working in older builds of OpenSUSE, what do you think may have happened in Tumbleweed to have broken the functionality?

Thank you so much for your help with this!

Well, not exactly “fight”.
But you have the system-wide settings which are the default for all users (which only the administrator/root can set), and KDE’s user settings that each user can set to what (s)he likes.
(if no layout is set in KDE, the system-wide one is used)

Apparently the installer/YaST doesn’t set the system-wide layout correctly in Tumbleweed at the moment.

KDE’s settings work as ever though, but they are only specific to that one user.

You might want to try setting it with “localectl set-x11-keymap gb” (and delete the KDE layout again) to see if that works.

If this was working in older builds of OpenSUSE, what do you think may have happened in Tumbleweed to have broken the functionality?

I can only guess there.
Some change elsewhere might have broken YaST, or a bug might have crept in. I think there were some changes in how the system-wide layout files are generated or similar (don’t know the details).
But I cannot say for sure.

Might be related to this:
https://bugzilla.opensuse.org/show_bug.cgi?id=943735