How to change a keyboard layout to Dvorak that assumes that the keyboard layout is QWERTY?

Method 1: using a text editor

  1. Open the file /etc/default/keyboard as root. For example, you can run sudo nano /etc/default/keyboard
  2. Change the line XKBMODEL="pc105" with your keyboard model (full list is here, starting from line 2).
  3. Change the line XKBLAYOUT="en" with your layout (presummably "bd". See the full list above, starting from line 189).
  4. Change the line XKBVARIANT="" with your variant (See the full list above, starting from line 284).
  5. Save the file (Ctrl+X and press Y).
  6. Restart the keyboard config with sudo service keyboard-setup restart

Method 2: using keyboard-configuration tool.

  1. Install with sudo apt-get install keyboard-configuration (you might have it installed already)
  2. Run the configuration program, by typing sudo dpkg-reconfigure keyboard-configuration
  3. Follow instructions to select the model of your keyboard, the layout, the variant, etc.
  4. Restart the keyboard config with sudo service keyboard-setup restart

Source: adapted from here.


The file at location /usr/share/X11/xkb/symbols/bd contains the following as the last lines:

//
// XKB symbol :: Probhat Bangla/Bengali Keyboard Layout
// Ref: www.ankurbangla.org/images/probhat_layout.png
//

xkb_symbols "probhat" {
include "in(ben_probhat)"
name[Group1]= "Bangla (Probhat)";
};

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:

xkb_symbols "ben_probhat" {
name[Group1]= "Bangla (India, Probhat)";

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:

xkb_symbols "ben_probhat" {
name[Group1]= "Bangla (India, Probhat)";
key <ESC>  { [ Escape ] };

// numbers
key <TLDE> { [ U200D, asciitilde   ] };
key <AE01> { [ U09E7, exclam       ] };
key <AE02> { [ U09E8, at           ] };
key <AE03> { [ U09E9, numbersign   ] };
key <AE04> { [ U09EA, U09F3    ] };
key <AE05> { [ U09EB, percent      ] };
key <AE06> { [ U09EC, asciicircum  ] };
key <AE07> { [ U09ED, U099E    ] };
key <AE08> { [ U09EE, U09CE    ] };
key <AE09> { [ U09EF, parenleft    ] };
key <AE10> { [ U09E6, parenright   ] };
key <AE11> { [ minus,     underscore   ] };
key <AE12> { [ equal,     plus         ] };
key <BKSP> { [ BackSpace               ] };

// tab, q to ] 
key <TAB>  { [   Tab,  ISO_Left_Tab     ] };
key <AD01> { [   U09A6,  U09A7  ] };
key <AD02> { [   U09C2,  U098A  ] };
key <AD03> { [   U09C0,  U0988  ] };
key <AD04> { [   U09B0,  U09DC  ] };
key <AD05> { [   U099F,  U09A0  ] };
key <AD06> { [   U098F,  U0990  ] };
key <AD07> { [   U09C1,  U0989  ] };
key <AD08> { [   U09BF,  U0987  ] };
key <AD09> { [   U0993,  U0994  ] };
key <AD10> { [   U09AA,  U09AB  ] };
key <AD11> { [   U09C7,  U09C8  ] };
key <AD12> { [   U09CB,  U09CC  ] };
key <RTRN> { [   Return                 ] };

// caps, a to ' 
//   key <CAPS> { [   Caps_Lock              ] };
key <AC01> { [   U09BE,  U0985  ] };
key <AC02> { [   U09B8,  U09B7  ] };
key <AC03> { [   U09A1,  U09A2  ] };
key <AC04> { [   U09A4,  U09A5  ] };
key <AC05> { [   U0997,  U0998  ] };
key <AC06> { [   U09B9,  U0983  ] };
key <AC07> { [   U099C,  U099D  ] };
key <AC08> { [   U0995,  U0996  ] };
key <AC09> { [   U09B2,  U0982  ] };
key <AC10> { [   semicolon,  colon      ] };
key <AC11> { [   apostrophe, quotedbl   ] };

// shift, z to /
//   key <LFSH> { [   Shift_L                ] };
key <AB01> { [   U09DF,  U09AF  ] };
key <AB02> { [   U09B6,  U09DD  ] };
key <AB03> { [   U099A,  U099B  ] };
key <AB04> { [   U0986,  U098B  ] };
key <AB05> { [   U09AC,  U09AD  ] };
key <AB06> { [   U09A8,  U09A3  ] };
key <AB07> { [   U09AE,  U0999  ] };
key <AB08> { [   comma,      U09C3  ] };
key <AB09> { [   U0964,  U0981  ] };
key <AB10> { [   U09CD,  question   ] };
key <BKSL> { [   U200C,  U0965  ] };

This gives this layout

Now you just need to reorder the keys like this:

// numbers
key <TLDE> { [ grave,   asciitilde, voidsymbol, voidsymbol ] };
key <AE01> ==> key <AE01> <== NO CHANGE!
key <AE02> ==> key <AE02> <== NO CHANGE!
key <AE03> ==> key <AE03> <== NO CHANGE!
key <AE04> ==> key <AE04> <== NO CHANGE!
key <AE05> ==> key <AE05> <== NO CHANGE!
key <AE06> ==> key <AE06> <== NO CHANGE!
key <AE07> ==> key <AE07> <== NO CHANGE!
key <AE08> ==> key <AE08> <== NO CHANGE!
key <AE09> ==> key <AE09> <== NO CHANGE!
key <AE10> ==> key <AE10> <== NO CHANGE!
key <AE11> ==> key <AC11>
key <AE12> ==> key <AD12>
key <BKSP> { [ BackSpace ] };

// key <TAB>  { [ Tab,  ISO_Left_Tab ] };
key <AD01> ==> key <AB02>
key <AD02> ==> key <AB08>
key <AD03> ==> key <AC03>
key <AD04> ==> key <AD09>
key <AD05> ==> key <AC08>
key <AD06> ==> key <AD05>
key <AD07> ==> key <AC04>
key <AD08> ==> key <AC05>
key <AD09> ==> key <AC02>
key <AD10> ==> key <AD04>
key <AD11> ==> key <AE11>
key <AD12> ==> key <AE12>
key <RTRN> { [ Return ] };

// key <CAPS> { [ Caps_Lock ] };
key <AC01> ==> key <AC01> <== NO CHANGE!
key <AC02> ==> key <AC10>
key <AC03> ==> key <AC06>
key <AC04> ==> key <AD06>
key <AC05> ==> key <AD07>
key <AC06> ==> key <AC07>
key <AC07> ==> key <AB03>
key <AC08> ==> key <AB04>
key <AC09> ==> key <AD10>
key <AC10> ==> key <AB01>
key <AC11> ==> key <AD01>

// key <LFSH> { [ Shift_L ] };
key <AB01> ==> key <AB10>
key <AB02> ==> key <AB05>
key <AB03> ==> key <AD08>
key <AB04> ==> key <AB09>
key <AB05> ==> key <AB06>
key <AB06> ==> key <AC09>
key <AB07> ==> key <AB07> <== NO CHANGE!
key <AB08> ==> key <AD02>
key <AB09> ==> key <AD03>
key <AB10> ==> key <AD11>
key <BKSL> { [ backslash,   bar,        voidsymbol, voidsymbol ] };

So that it looks like below in the file /usr/share/X11/xkb/symbols/in

xkb_symbols "ben_probhat" {
name[Group1]= "Bangla (India, Probhat)";
key <ESC>  { [ Escape ] };

// numbers
key <TLDE> { [ U200D, asciitilde   ] };
key <AE01> { [ U09E7, exclam       ] };
key <AE02> { [ U09E8, at           ] };
key <AE03> { [ U09E9, numbersign   ] };
key <AE04> { [ U09EA, U09F3    ] };
key <AE05> { [ U09EB, percent      ] };
key <AE06> { [ U09EC, asciicircum  ] };
key <AE07> { [ U09ED, U099E    ] };
key <AE08> { [ U09EE, U09CE    ] };
key <AE09> { [ U09EF, parenleft    ] };
key <AE10> { [ U09E6, parenright   ] };
key <AC11> { [ minus,     underscore   ] };
key <AD12> { [ equal,     plus         ] };
key <BKSP> { [ BackSpace               ] };

// tab, q to ] 
key <TAB>  { [   Tab,  ISO_Left_Tab     ] };
key <AB02> { [   U09A6,  U09A7  ] };
key <AB08> { [   U09C2,  U098A  ] };
key <AC03> { [   U09C0,  U0988  ] };
key <AD09> { [   U09B0,  U09DC  ] };
key <AC08> { [   U099F,  U09A0  ] };
key <AD05> { [   U098F,  U0990  ] };
key <AC04> { [   U09C1,  U0989  ] };
key <AC05> { [   U09BF,  U0987  ] };
key <AC02> { [   U0993,  U0994  ] };
key <AD04> { [   U09AA,  U09AB  ] };
key <AE11> { [   U09C7,  U09C8  ] };
key <AE12> { [   U09CB,  U09CC  ] };
key <RTRN> { [   Return                 ] };

// caps, a to ' 
//   key <CAPS> { [   Caps_Lock              ] };
key <AC01> { [   U09BE,  U0985  ] };
key <AC10> { [   U09B8,  U09B7  ] };
key <AC06> { [   U09A1,  U09A2  ] };
key <AD06> { [   U09A4,  U09A5  ] };
key <AD07> { [   U0997,  U0998  ] };
key <AC07> { [   U09B9,  U0983  ] };
key <AB03> { [   U099C,  U099D  ] };
key <AB04> { [   U0995,  U0996  ] };
key <AD10> { [   U09B2,  U0982  ] };
key <AB01> { [   semicolon,  colon      ] };
key <AD01> { [   apostrophe, quotedbl   ] };

// shift, z to /
//   key <LFSH> { [   Shift_L                ] };
key <AB10> { [   U09DF,  U09AF  ] };
key <AB05> { [   U09B6,  U09DD  ] };
key <AD08> { [   U099A,  U099B  ] };
key <AB09> { [   U0986,  U098B  ] };
key <AB06> { [   U09AC,  U09AD  ] };
key <AC09> { [   U09A8,  U09A3  ] };
key <AB07> { [   U09AE,  U0999  ] };
key <AD02> { [   comma,      U09C3  ] };
key <AD03> { [   U0964,  U0981  ] };
key <AD11> { [   U09CD,  question   ] };
key <BKSL> { [   U200C,  U0965  ] };

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 :(


You have first to install the ibus-avro package. You’ll find a good description how to do it here. You have to open a terminal, do cd /usr/src and follow the instructions.

Afterwards, you have to select the keyboard layout from the GUI as described.