Bug 224489 - Configurable shortcuts to switch to specific keyboard layouts
Summary: Configurable shortcuts to switch to specific keyboard layouts
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard_layout (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Andriy Rysin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 17:47 UTC by Dotan Cohen
Modified: 2011-03-02 22:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dotan Cohen 2010-01-27 17:47:39 UTC
Version:            (using Devel)
Installed from:    Compiled sources

Please add an option to configure shortcuts to specific keyboard layouts, such as Ctrl-1 for English, Ctrl-2 for Hebrew, Ctrl-3 for Russian. Thanks.
Comment 1 Dotan Cohen 2010-01-27 17:48:01 UTC
This is possible in Windows.
Comment 2 Christoph Feck 2010-01-27 20:52:14 UTC
Do you mean global hot keys to switch between keyboard layouts, or do you want a specific action to be assigned to different keys depending on current keyboard layout (to work around bug 83732)?
Comment 3 Dotan Cohen 2010-01-28 07:45:54 UTC
> Do you mean global hot keys to switch between
> keyboard layouts?

Yes. I would like to set (for example) Ctrl-1 to English layout, Ctrl-2 to Hebrew layout, and Ctrl-3 to Russian layout. Currently the user must rotate active layouts.

In Windows, when this is set, the user can just Ctrl-1 and know that he is in English, no matter which layout was previously selected. He doesn't have to search for the too-small icon way over in the corner of the system tray, he doesn't have to experiment to see what characters will appear in the text field, he doesn't have to think at all. Muscle memory types Ctrl-1 before English text, no matter if the current language is English already or something else. It always Just Works (tm) with no frustrations.

I'll put it this way: my only computer is Kubuntu with KDE 4. When I have to type a multi-language document, I go to the university's library to use Windows just for this feature. It is that helpful.
Comment 4 Andriy Rysin 2011-02-20 05:30:21 UTC
I have a code almost ready.
Comment 5 Dotan Cohen 2011-02-20 20:43:47 UTC
Great, Andriy! Thanks!
Comment 6 Andriy Rysin 2011-03-02 06:02:18 UTC
Git commit 4255976ffc53a8531a6565d65b53ae0beec99729 by Andriy Rysin.
Committed on 02/03/2011 at 05:59.
Pushed by rysin into branch 'master'.

Allow (global) shortcuts per keyboard layout
BUG: 224489
FIXED-IN: 4.7

M  +104  -8    kcontrol/keyboard/bindings.cpp     
M  +28   -3    kcontrol/keyboard/bindings.h     
M  +11   -3    kcontrol/keyboard/flags.cpp     
M  +2    -1    kcontrol/keyboard/flags.h     
M  +1    -0    kcontrol/keyboard/kcm_add_layout_dialog.cpp     
M  +29   -5    kcontrol/keyboard/kcm_add_layout_dialog.ui     
M  +0    -54   kcontrol/keyboard/kcm_keyboard.cpp     
M  +31   -18   kcontrol/keyboard/kcm_keyboard_widget.cpp     
M  +3    -1    kcontrol/keyboard/kcm_keyboard_widget.h     
M  +79   -6    kcontrol/keyboard/kcm_view_models.cpp     
M  +25   -1    kcontrol/keyboard/kcm_view_models.h     
M  +14   -6    kcontrol/keyboard/keyboard_config.cpp     
M  +49   -31   kcontrol/keyboard/keyboard_daemon.cpp     
M  +8    -2    kcontrol/keyboard/keyboard_daemon.h     
M  +7    -18   kcontrol/keyboard/layout_tray_icon.cpp     
M  +7    -5    kcontrol/keyboard/layout_tray_icon.h     
M  +5    -3    kcontrol/keyboard/layouts_menu.cpp     
M  +7    -0    kcontrol/keyboard/x11_helper.h     

http://commits.kde.org/kde-workspace/4255976ffc53a8531a6565d65b53ae0beec99729
Comment 7 Dotan Cohen 2011-03-02 22:02:44 UTC
Terrific, Andriy, thanks!