Please see this bug and the long and heated discussion around it: https://bugzilla.gnome.org/show_bug.cgi?id=162726
The behaviour you want was actually the default behaviour before and was considered a bug by people using the Dvorak layout...
PS: That it works in gnome-terminal is considered a bug...
My first attempt was to make the control keys act simultaneously as Control and as a third-level chooser, then define a keyboard layout with Dvorak on levels 1 and 2, and Qwerty on levels 3 and 4. This doesn't seem possible in XKB, however. In addition, the comments in the source of the dvorak-qwerty program you've linked state that
Although it is possible to define an XKB layout which implements Dvorak-Qwerty, doing so exposes a depressing number of bugs across the board in X apps. Since it is the responsibility of each X app to interpret the keyboard layout itself, rather than having the X server do the work, different GUI frameworks actually tend to have different bugs that kick in when using such a layout. Fixing them all would be infeasible.
Your best bet is probably to get the dvorak-qwerty hack working. Most of what I'm about to write you probably know. The source says to compile it with
gcc xdq.c -o xdq -std=c99 -O2 -lX11
then run it with
./xdq
or give the absolute path so you can put it in your startup items.
When I ran the program it gave me the following warning:
Failed to grab 35 key combinations.
This is probably because some hotkeys are already grabbed by the system.
Unfortunately, these system-wide hotkeys cannot be automatically remapped by
this tool. However, you can usually configure them manually.
However, I tested it with ^W
, ^Q
, ^C
, ^X
, and ^V
, and it worked as expected. If you want it to grab other modifiers (ALt+Ctrl
and Super
) the combinations the system is already using for other things, add -DXQD_GREEDY
(not -DXDQ_GREEDY
as the source says) to the compilation command.
If it failed to compile with the error
xdq.c:87:22: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
then you should install the package libx11-dev
with
sudo apt-get install libx11-dev
If this doesn't get the program working, let me know and we can try to work it out.
Best Answer
The file at location /usr/share/X11/xkb/symbols/bd contains the following as the last lines:
In your case if I understand correctly, you should not edit this file but instead the file layout at location /usr/share/X11/xkb/symbols/in
Locate the lines:
Thereupon, starting the new layout remapping.
Note that you don't need to remap each keys 1 by 1 again because the unicodes for your language are already set for this layout! You only need to reorder the keys and this works for any languages and/or layouts whose phonetics are based on qwerty and the user rather wants to map it to standard dvorak.
In your case the file /usr/share/X11/xkb/symbols/in looks like this:
This gives this layout
Now you just need to reorder the keys like this:
So that it looks like below in the file /usr/share/X11/xkb/symbols/in
Ultimately giving the layout I assume you would like
Note that you must make a backup of the original file layout before starting to edit and save it as root or otherwise you'll have to download and restore it back from freedesktop.org/wiki/Software/XKeyboardConfig
Albeit I don't understand nothing from the alphabet, I hope this could help because I've been using the dvorak layout as well for many years and I hope that one day it can replace the qwerty layout from being always the standard :(