Bug 245184 - virtual keyboard plasmoid is confused by more than two configured key mappings
Summary: virtual keyboard plasmoid is confused by more than two configured key mappings
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-misc (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Björn Ruberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-20 00:29 UTC by Dennis Schridde
Modified: 2018-06-08 19:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Plasma Keyboard widget when Arabic layout is selected (40.82 KB, image/png)
2013-12-18 11:30 UTC, Hendy Irawan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2010-07-20 00:29:49 UTC
Version:           unspecified (using Devel) 
OS:                Linux

I am using the plasmoid "Virtuelle Tastatur" ~= "virtual keyboard" and they "keyboard layout" switching program (the thing which displays the flag of the current input language).

When I switch the system input language, the virtual keyboard will not show the new layout, but will stay with the original german layout.
This is especially problematic for non-european languages like chinese, cyrillic, arabic, etc.

kde-4.4.92

Reproducible: Didn't try
Comment 1 Dennis Schridde 2010-07-20 00:49:02 UTC
The application I am referring to might be "plasmaboard", not kvkbd. I just know it shows up in the list as "Virtuelle Tastatur" in german.
Comment 2 Björn Ruberg 2010-08-06 00:22:07 UTC
After having pressed the "Shift" key, the keyboard should adapt to the new layout. I don't know currently how to get a "layout changed" event so that the relabeling can be done automatically.
Comment 3 Dennis Schridde 2010-08-06 10:49:18 UTC
I assume you are referring to a version of KDE later than 4.5_rc3 and this was implemented just recently?
I am using 4.5_rc3, and just tried again with all display-layouts of the virtual keyboard: None of them displays arabic letters after I change my keyboard-layout using the keyboard-layout plasmoid. Even after pressing the shift key.
Comment 4 Björn Ruberg 2010-08-06 20:27:40 UTC
Maybe I lost the feature in the redesign for kde 4.5. Is the keyboard able to display arabic keyboards at all if you start it with that layout?
Comment 5 Dennis Schridde 2010-08-06 20:38:07 UTC
I set the keyboard layout to arabic using the layout-switching plasmoid, then added the keyboard-display plasmoid. It will still display the original german layout. The same is true when selecting de-neo2 via the plasmoid.

It probably receives the information which layout is active from a source that is not updated when the active layout is changed during runtime.
Comment 6 Björn Ruberg 2010-08-06 20:50:19 UTC
The keyboard does the mapping directly by the X-Server - it should know the layout :)
My question remains: Can plasmaboard display arabic layouts at all? I never tested...
Comment 7 Dennis Schridde 2010-08-06 21:16:48 UTC
Well, when switching layouts using the kde layout-switching plasmoid, the virtual-keyboard plasmoid never shows anything but the original layout KDE was started with. So far I did not try starting KDE with another layout.
Comment 8 Björn Ruberg 2010-08-06 21:19:09 UTC
Please try it for me :)
Comment 9 Björn Ruberg 2010-08-07 13:06:54 UTC
Well, I tried it myself now. Actually you don't have to restart kde but only plasma.
Anyway, for me everything works fine with the shift-trick. I immediately had arabic characters on the keyboard after using such a layout. It does not work with every layout - had a chinese one that didn't touch the english layout. Don't know the reason.
Comment 10 Dennis Schridde 2010-08-17 12:15:37 UTC
In "systemsettings -> input devices -> keyboard -> [layouts]-tab" I have enabled ~"activate layout display" ("Belegungsanzeige aktivieren" in german). This is the layout-switching "plasmoid" I talked about earlier.

I tried it now:
systemsettings -> input devices -> keyboard -> [layouts]-tab: Change the order so that arabic is first.
- restart kde
- input is in arabic
- adding a virtual-keyboard plasmoid to the panel will display with an arabic layout (very ugly rendered glyphs, but it works)

When I now switch the layout using the icon in the systray, the virtual-keyboard still displays the arabic layout.

When I change the order of layouts in "systemsettings -> input devices -> keyboard -> [layouts]-tab" so that the german layout is first, your "shift trick" will work, and the virtual-keyboard displays a german layout.

Summary: There are two issues:
1) virtual-keyboard does not notice when the layout is switched, but needs the "shift trick".
2) It uses the *first* keyboard layout, instead of the *active* one.
Comment 11 Björn Ruberg 2010-08-18 19:07:39 UTC
Okay, confirming this. KDE's layout management must add a layer on top of the X-server which plasmaboard misses.
Comment 12 Dennis Schridde 2010-08-18 21:55:32 UTC
I wonder whether this can be read/changed via Solid. That'd seem like the right place to change such hardware properties.
Comment 13 Björn Ruberg 2010-08-21 17:55:50 UTC
Thanks for reporting and investigating, this is fixed in trunk revision 1166313. The patch is backported to the 4.5 branch, so the problem should disappear with KDE 4.5.1
Comment 14 Björn Ruberg 2010-08-21 18:29:53 UTC
SVN commit 1166310 by ruberg:

BUG: 245184
Made plasmaboard display the keyboard layout that is selected by the layout switcher



 M  +5 -1      Helpers.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1166310
Comment 15 Björn Ruberg 2011-01-03 17:54:20 UTC
SVN commit 1211316 by ruberg:

BUG: 245184
Widget now uses a new dbus signal when the keyboard layout is changed to automatically adjust to it



 M  +6 -2      widget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211316
Comment 16 Erik Martens 2011-01-26 21:42:57 UTC
It seems to me the bug persists in KDE 4.5.3, installed on Ubuntu 10.10.

Symptoms:
1. I need to press the shift key to update the keyboard layout in the Virtual Keyboard widget

2. This only works as long as no more than 2 keyboard layouts are installed. Third layout displays wrong, and the fourth displays a lot of special characters, and triangles.
Comment 17 Björn Ruberg 2011-02-06 18:07:12 UTC
The layout changes automatically with KDE 4.6. That bug is solved. 
But the keyboard gets confused as soon as more than two key mappings are configured. I have no clue why. When someone with xkbd knowledge wants to look into it, the code is in Helpers.h
Comment 18 Hendy Irawan 2013-12-18 11:27:56 UTC
Seem to be related to (or duplicated by?) Bug #309138
Comment 19 Hendy Irawan 2013-12-18 11:30:45 UTC
Created attachment 84157 [details]
Plasma Keyboard widget when Arabic layout is selected

Screenshot: Plasma Keyboard widget when Arabic layout is selected

Using KDE 4.11.2, so this particular bug wasn't fixed in 4.5.x.
Comment 20 Hendy Irawan 2013-12-18 11:32:03 UTC
Workaround: Change the Keyboard layouts so that Arabic is first. This makes Plasma Keyboard Widget work "correctly" for Arabic (only), but is not ideal. So the 2nd and rest of layouts will still be incorrect.
Comment 21 Nate Graham 2018-06-08 19:59:23 UTC
Hello!

This feature request was filed for KDE Plasma 4, which reached end-of-support status in August 2015. KDE Plasma 5's desktop shell has been almost completely rewritten for better performance and usability, so it is likely that this feature request is already implemented in Plasma 5, or is no longer applicable.

Accordingly, we hope you understand why we must close this feature request. If the requested feature is still desired but not implemented in KDE Plasma 5.12 or later, please feel free to open a new ticket in the "plasmashell" product after reading https://community.kde.org/Get_Involved/Bug_Reporting

If you would like to get involved in KDE's bug triaging effort so that future mass bug closes like this are less likely, please read https://community.kde.org/Get_Involved#Bug_Triaging

Thanks for your understanding!

Nate Graham