Bug 176113

Summary: multiple keyboard layouts: provide shared key-permanent shortcuts
Product: [Frameworks and Libraries] frameworks-kconfig Reporter: Maciej Pilichowski <bluedzins>
Component: generalAssignee: Matthew Dawson <matthew>
Status: CONFIRMED ---    
Severity: wishlist CC: adrien.cordonnier, al4321, c.jason.kim, dd, kde-2011.08, kdelibs-bugs, leva, mail, nate, wolfgang.brehm
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Maciej Pilichowski 2008-11-26 10:19:11 UTC
Version:            (using KDE 4.1.3)
Installed from:    SuSE RPMs

This issue was discusses in usability ML "National default shortcuts set".

multiple keyboard layouts: provide shared key-permanent shortcuts

...so if user had several layouts no matter what layout is chosen she/he would still press the same keys (as shortcuts). No matter what layout is chosen when user defines new shortcut it is shared with other layouts, so after a switch, shortcut is still there.

Proposed solution -- when adding layouts (sys.settings) the first layout would have special meaning as primary layout. This layout would be used to display shortcuts in menus, shortcut dialogs, etc. 

And for usage -- example from ML.

DK keyboard layout for further reference.
http://en.wikipedia.org/wiki/Image:Nederlandse_toetsenbordindeling_-_tekst_als_paden.svg

User has US as primary layout and has to press US characters ctrl= 
(which in this example is the same as keys), after adding DK it is 
still US ctrl= (keys) despite the fact than in DK pressing US key = gives °.

Another example:

I have US keyboard, but not US layout in KDE.
When I press 
`
(left, upper corner key) I get
_

I set ctrl+_ as zoom in. This mean I have to press US KEYS 
ctrl and ` the KDE shows it as ctrl+_ (because I set this layout as 
primary). Now, I add DK layout and I switch to it.

To zoom in, I still have to press US KEYS ctrl+` and still KDE shows 
this shortcut as ctrl+_. But in DK when I press US KEY ` alone I get @.
 
So, in short -- shared key-permanent shorcuts:
a) shortcuts KEYS are not moved during layout switch, you use the same 
KEYS
b) it is up to user what layout KDE uses for displaying shortcuts (it 
does not have to be hardware keyboard layout)
c) shortcuts always are displayed the same, no matter the layout is 
used
d) shorcuts are shared
Comment 1 Dotan Cohen 2008-11-27 23:02:58 UTC
This issue had been discussed on the Mozilla bugtracker for years. The final outcome (now available in Firefox 3) is essentially what Maciej proposes, and it seems that everyone (over 100 posters at the Mozilla bugtracker) is happy with the solution. I fully back this proposal, and as a non-Latin keyboard layout user, I long for the day when I will not have to switch keyboard layouts in KDE apps just to run a shortcut.
Comment 2 Dotan Cohen 2008-12-02 18:13:48 UTC
Thiago Macieira mentions in comment #1 of Bug 97780 this:
"""
Set up your keyboard layout in X as "ru,us", so that a Latin representation is overlayed. This will get you your Ctrl+C shortcut working even when "C" is not "C", but "С".
"""

I can confirm that with "il,us" _some_ keyboard shortcuts work, and some do not. For instance, Cut and Undo work, while Paste does not. Tested in Kate.
Comment 3 Dotan Cohen 2008-12-02 18:16:19 UTC
This bug may be a dupe of Bug 97780, could the OP please take a look and mark as dupe if necessary. I am having a hard time deciding.

In any case, it should be noted that this bug is related to Bug 176135 which requests more customization for the alternate layout shortcuts. Not a dupe, but more fuctionality.
Comment 4 Maciej Pilichowski 2008-12-02 22:11:50 UTC
Yes, it is dupe, since it has 0 votes, wouldn't be better to reverse-dupes linking (i.e. marking the other one as dupe) just to avoid copying this whole report?
Comment 5 Dotan Cohen 2008-12-27 14:15:39 UTC
*** Bug 97780 has been marked as a duplicate of this bug. ***
Comment 6 Dotan Cohen 2008-12-27 14:19:00 UTC
This page has an overview of the problem under the heading "shortcuts":
http://lindesk.com/2008/12/kde-vs-gnome-a-dvorak-users-perspective/

In short, it describes Gnome behaviour in that there is a Gnome option to have the layout temporarily switched to Qwerty whenever the Ctrl key is pressed. This seems the logical and obvious answer to the problem, and I would like to see it implemented in KDE.
Comment 7 Christoph Burger-Scheidlin 2009-02-08 15:28:43 UTC
This is a duplicate of bug 133435 but I am not certain which bug should be closed since there is more discussion on this bug than on 133435 and 133435 refers to kde 3.5
Comment 8 Dotan Cohen 2009-02-08 18:58:03 UTC
*** Bug 133435 has been marked as a duplicate of this bug. ***
Comment 9 Dotan Cohen 2009-02-08 19:03:02 UTC
Thanks, Christoph. I marked bug 133435 as the dupe of this one as this bug already has another dupe and a prominent KDE dev recently said that he pays attention to how many dupes a bug has.
Comment 10 JayKim 2009-09-14 17:32:02 UTC
Thank god I found this report, now I know I'm not crazy. Is there any way to turn this behavior off? Here's why I ask:

I run 2 different keyboards, a built-in qwerty laptop keyboard, and an external Touchstream dvorak keyboard, and I type exclusively in dvorak. When on the road and typing on the built-in keyboard (in dvorak layout) everything is fine, shortcuts work and I'm happy. When at my desk and typing on the dvorak keyboard (in us layout) typing is fine, but nearly all kde shortcuts are mixed up. 

For reference, the dvorak layout looks like this: http://en.wikipedia.org/wiki/File:KB_United_States_Dvorak.svg, and my layout setup is 'us(dvorak),us(basic)' using hal/evdev.

For example, pressing ctrl+s results in ctrl+o in kwrite because (I'm guessing) the Touchstream keyboard sends the scancode for 's' which kde assumes is from a qwerty keyboard, translates it according to the 'primary' layout (which is dvorak) even though I'm in the 'secondary' layout (which is us) and pops out with 'o'.

This started happening after I switched to kde4 a couple of months ago. It only happens with kde apps (not gnome/gtk), and I have confirmed the behavior changes if I change the order of the layouts (Touchstream shortcuts work, but then built-in keyboard shortcuts get mixed up). 

The only workaround I have is to run setxkbmap manually when switching keyboards, and if I forget to do so before removing the Touchstream it gets annoying trying to figure out how to type it on qwerty (I've long since forgotten how to type on anything but dvorak).
Comment 11 Daniel 2009-11-01 09:21:42 UTC
*** Bug 202173 has been marked as a duplicate of this bug. ***
Comment 12 Dotan Cohen 2010-07-27 15:13:51 UTC
JayKim, might you be referring to this bug:
https://bugs.kde.org/show_bug.cgi?id=154212
Comment 13 Adrien Cordonnier 2018-12-16 09:09:56 UTC
Unfortunately, this bug still exists. I faced the bug on KDE Neon Developer Edition, unstable branches (Plasma 5.14.80, KF5 5.54.0, Qt 5.11.2).

In my case, there was no shortcuts working to go back to the default zoom after accidentally pressing 'Ctrl +'. The assigned shortcuts to zoom out (Ctrl -) and to revert to the default zoom (Ctrl 0) do not work on my French keyboard (I fixed it by setting 'InitialZoom=1' in ~/.config/kwinrc and then pressing 'Shift Alt F12' twice' - it took me quite a while to find the solution).