I configured KDE to switch easily from a bépo (french-dvorak) to an azerty layout. I configured it with the KDE interface (
systemsettings), but I guess it just call
setxkbmap be and
The azerty layout is the default (and the first in the list of the layouts).
However, the shortcuts remains attached to the physical keys: pressing the q key yields a "q" in azerty and an "a" with the bepo layout.
However, pressing ctrl + q have the same effect in both cases (quitting, in most softwares, for instance with
konsole). Note however that some softwares (as
firefox) do the switch (pressing the j key, which prints a "t" with the bépo layout, and ctrl at the same time, opens a new tab, which is the expected behaviour). According to this comment, GTK apps do the switching, whereas Qt apps do not.
How to make the keys of the shortcuts and the key to enter text coincide in all software
More precisely, the shortcuts are defined according to the first layout in the list. How to make the definition of the shortcuts switch as well for Qt apps?
$ kded4 --version Qt : 4.8.6 Plate-forme de développement de KDE : 4.14.2 Démon de KDE : 4.14.2 $ uname -a Linux zepto 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.1 (jessie) Release: 8.1 Codename: jessie
$ setxkbmap -query rules: evdev model: pc105 layout: fr,fr variant: oss,bepo options: grp:rwin_toggle $ localectl list-x11-keymap-variants fr bepo bepo_latin9 bre dvorak geo latin9 latin9_nodeadkeys latin9_sundeadkeys mac nodeadkeys oci oss oss_latin9 oss_nodeadkeys oss_sundeadkeys sundeadkeys
Related pages :
- Shortcut keys that are independent to keyboard layout (the problem is the opposite of mine!)
- http://kate-editor.org/2013/10/07/multiple-keyboard-layouts-and-shortcuts/ (proposes a 2-year-old workaround). According to this page, "the order [of the layouts] defines a priority, and the shortcuts always use the first entry in the list."
- https://bugs.kde.org/show_bug.cgi?id=197552 (bug report, that claims that it has been closed)
- http://forums.linuxmint.com/viewtopic.php?f=56&t=189004 (solution to remap a single key)
- How do I run a script when I switch between keyboard layouts could probably do the trick, by triggering a script that changes the order of the layouts.
Edit: This question has been opened 977 days ago, received two bounties, 28 upvotes, has 10 favorites, it is the most upvoted unanswered question as of now, but it wasn't offered one serious motivated answer? I should probably being submitting bug report, but I don't even know what software is responsible!