The easiest way for you is to edit an existing dvorak layout.
there are several versions of the dvorak layout available in X11 :
- English (Dvorak)
- English (Dvorak, international with dead keys)
- English (Dvorak alternative international no dead keys) etc.
Look for them in the file /usr/share/X11/xkb/symbols/us or /usr/share/X11/xkb/symbols/gb.
The idea is to choose one you’re not using — choose the most convenient one in the list, the closest to the Dvorak you’re already using — and to replace the english characters in that file with the bengali characters you want to assign each key to. (don’t forget to save a copy of the file you’re editing)
It should look like this
key <TLDE> { [dead_grave, dead_tilde, grave, asciitilde ] };
key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
key <AE02> { [ 2, at, twosuperior, dead_doubleacute ] };
key <AE03> { [ 3, numbersign, threesuperior, dead_macron ] };
key <AE04> { [ 4, dollar, currency, sterling ] };
key <AE05> { [ 5, percent, EuroSign, dead_cedilla ] };
key <AE06> { [ 6, dead_circumflex, onequarter, asciicircum ] };
key <AE07> { [ 7, ampersand, onehalf, dead_horn ] };
key <AE08> { [ 8, asterisk, threequarters, dead_ogonek ] };
key <AE09> { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
key <AE10> { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
key <AE11> { [ bracketleft, braceleft, guillemotleft, leftdoublequotemark ] };
key <AE12> { [bracketright, braceright, guillemotright, rightdoublequotemark ] };
key <AD01> { [dead_acute, dead_diaeresis, apostrophe, quotedbl ] };
key <AD02> { [ comma, less, ccedilla, Ccedilla ] };
key <AD03> { [ period, greater, dead_abovedot, dead_caron ] };
key <AD04> { [ p, P, odiaeresis, Odiaeresis ] };
key <AD05> { [ y, Y, udiaeresis, Udiaeresis ] };
// key <AD06> { [ f, F ] };
// key <AD07> { [ g, G ] };
key <AD08> { [ c, C, copyright, cent ] };
key <AD09> { [ r, R, registered, registered ] };
key <AD10> { [ l, L, oslash, Ooblique ] };
key <AD11> { [ slash, question, questiondown, dead_hook ] };
// key <AD12> { [ equal, plus, multiply, division ] };
key <AC01> { [ a, A, aacute, Aacute ] };
key <AC02> { [ o, O, oacute, Oacute ] };
key <AC03> { [ e, E, eacute, Eacute ] };
key <AC04> { [ u, U, uacute, Uacute ] };
key <AC05> { [ i, I, iacute, Iacute ] };
key <AC06> { [ d, D, eth, ETH ] };
// key <AC07> { [ h, H ] };
key <AC08> { [ t, T, thorn, THORN ] };
key <AC09> { [ n, N, ntilde, Ntilde ] };
key <AC10> { [ s, S, ssharp, section ] };
// key <AC11> { [ minus, underscore, yen, dead_belowdot ] };
key <AB01> { [ semicolon, colon, paragraph, degree ] };
key <AB02> { [ q, Q, adiaeresis, Adiaeresis ] };
// key <AB03> { [ j, J ] };
key <AB04> { [ k, K, oe, OE ] };
// key <AB05> { [ x, X ] };
// key <AB06> { [ b, B ] };
key <AB07> { [ m, M, mu, mu ] };
key <AB08> { [ w, W, aring, Aring ] };
// key <AB09> { [ v, V ] };
key <AB10> { [ z, Z, ae, AE ] };
key <BKSL> { [ backslash, bar, notsign, brokenbar ] };
include "level3(ralt_switch)"
To use to example you gave, on the line : key <AC03>
replace e
with U2496
, which is the corresponding UTF code.
In the file /usr/share/X11/xkb/symbols/bd they use a coding like “0x10009EA” but I think you can use the UTF code you can find on this page.
once you’re done, you can save directly in either /usr/share/X11/xkb/symbols/us or /usr/share/X11/xkb/symbols/gb you were editing (which works just fine, it just means you have a bengali layout inside a file of english layouts), or you can just copy the result into the file /usr/share/X11/xkb/symbols/bd and replace the default layout with the one you just created. just be careful, and leave all this code as it is :
default partial alphanumeric_keys
xkb_symbols "basic" {
name[Group1]= "Bangla";
key <ESC> { [ Escape ] };
Then all you need to do is to delete all .xkm files from "/var/lib/xkb"
and you’re done, the layout you just edited is ready to be used.
When I created my own layout using this tutorial (using the french layout bépo as a base to a russian layout that correspond to the bépo I’m used to) I couldn’t find to create a new layout, so that’s the way I used to make it happen.
To better illustrate this explanation, here is what my /usr/share/X11/xkb/symbols/fr file looks look. first you have the default bépo layout, and then you have my bépo/russian layout. Notice that only the second, third and fourth rows are edited. the code include "fr(bepo)"
takes care of that, so that the first row of this layout is the first row of the default bépo layout.
// Bépo : Improved ergonomic french keymap using Dvorak method.
// Built by community on 'Dvorak Fr / Bépo' :
// see http://www.clavier-dvorak.org/wiki/ to join and help.
// XOrg integration (1.0rc2 version) in 2008
// by Frédéric Boiteux <fboiteux at free dot fr>
//
// Bépo layout (1.0rc2 version) for a pc105 keyboard (french) :
// ┌─────┐
// │ S A │ S = Shift, A = AltGr + Shift
// │ s a │ s = normal, a = AltGr
// └─────┘
//
// ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
// │ # ¶ │ 1 „ │ 2 “ │ 3 ” │ 4 ≤ │ 5 ≥ │ 6 │ 7 ¬ │ 8 ¼ │ 9 ½ │ 0 ¾ │ ° ′ │ ` ″ ┃ ⌫ Retour┃
// │ $ – │ " — │ « < │ » > │ ( [ │ ) ] │ @ ^ │ + ± │ - − │ / ÷ │ * × │ = ≠ │ % ‰ ┃ arrière┃
// ┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫
// ┃ ┃ B ¦ │ É ˝ │ P § │ O Œ │ È ` │ ! │ V │ D Ð │ L │ J IJ │ Z Ə │ W ┃Entrée ┃
// ┃Tab ↹ ┃ b | │ é ˊ │ p & │ o œ │ è ` │ ˆ ¡ │ v ˇ │ d ð │ l / │ j ij │ z ə │ w ̆ ┃ ⏎ ┃
// ┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓ ┃
// ┃ ┃ A Æ │ U Ù │ I ˙ │ E ¤ │ ; ̛ │ C ſ │ T Þ │ S ẞ │ R ™ │ N │ M º │ Ç , ┃ ┃
// ┃Maj ⇬ ┃ a æ │ u ù │ i ̈ │ e € │ , ’ │ c © │ t þ │ s ß │ r ® │ n ˜ │ m ¯ │ ç ¸ ┃ ┃
// ┣━━━━━━━┳┹────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┲┷━━━━━┻━━━━━━┫
// ┃ ┃ Ê │ À │ Y ‘ │ X ’ │ : · │ K │ ? ̉ │ Q ̣ │ G │ H ‡ │ F ª ┃ ┃
// ┃Shift ⇧┃ ê / │ à \ │ y { │ x } │ . … │ k ~ │ ' ¿ │ q ˚ │ g µ │ h † │ f ˛ ┃Shift ⇧ ┃
// ┣━━━━━━━╋━━━━━┷━┳━━━┷━━━┱─┴─────┴─────┴─────┴─────┴─────┴───┲━┷━━━━━╈━━━━━┻━┳━━━━━━━┳━━━┛
// ┃ ┃ ┃ ┃ Espace inséc. Espace inséc. fin ┃ ┃ ┃ ┃
// ┃Ctrl ┃Meta ┃Alt ┃ ␣ (Espace) _ ␣ ┃AltGr ⇮┃Menu ┃Ctrl ┃
// ┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛
partial alphanumeric_keys
xkb_symbols "bepo" {
include "level3(ralt_switch)"
include "keypad(oss)"
name[Group1]= "French (Bepo, ergonomic, Dvorak way)";
// First row
key <TLDE> { [ dollar, numbersign, endash, paragraph ] }; // $ # – ¶
key <AE01> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ quotedbl, 1, emdash, doublelowquotemark ] }; // " 1 — „
key <AE02> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ guillemotleft, 2, less, leftdoublequotemark ] }; // « 2 < “
key <AE03> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ guillemotright, 3, greater, rightdoublequotemark ] }; // » 3 > ”
key <AE04> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ parenleft, 4, bracketleft, lessthanequal ] }; // ( 4 [ ≤
key <AE05> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ parenright, 5, bracketright, greaterthanequal ] }; // ) 5 ] ≥
key <AE06> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ at, 6, asciicircum ] }; // @ 6 ^
key <AE07> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ plus, 7, plusminus, notsign ] }; // + 7 ± ¬
key <AE08> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ minus, 8, U2212, onequarter ] }; // - 8 − ¼
key <AE09> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ slash, 9, division, onehalf ] }; // / 9 ÷ ½
key <AE10> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ asterisk, 0, multiply, threequarters ] }; // * 0 × ¾
key <AE11> { [ equal, degree, notequal, minutes ] }; // = ° ≠ ′
key <AE12> { [ percent, grave, U2030, seconds ] }; // % ` ‰ ″
// Second row
key <AD01> { [ b, B, bar, brokenbar ] }; // b B | ¦
key <AD02> { [ eacute, Eacute, dead_acute, dead_doubleacute ] }; // é É ˊ ˝
key <AD03> { [ p, P, ampersand, section ] }; // p P & §
key <AD04> { [ o, O, oe, OE ] }; // o O œ Œ
key <AD05> { [ egrave, Egrave, dead_grave, grave ] }; // è È ` `
key <AD06> { [ dead_circumflex, exclam, exclamdown ] }; // ^ ! ¡
key <AD07> { [ v, V, dead_caron ] }; // v V ˇ
key <AD08> { [ d, D, eth, ETH ] }; // d D ð Ð
key <AD09> { [ l, L, dead_stroke ] }; // l L /
key <AD10> { [ j, J, U0133, U0132 ] }; // j J ij IJ
key <AD11> { [ z, Z, schwa, SCHWA ] }; // z Z ə Ə
key <AD12> { [ w, W, dead_breve ] }; // w W ̆
// Third row
key <AC01> { [ a, A, ae, AE ] }; // a A æ Æ
key <AC02> { [ u, U, ugrave, Ugrave ] }; // u U ù Ù
key <AC03> { [ i, I, dead_diaeresis, dead_abovedot ] }; // i I ̈ ˙
key <AC04> { [ e, E, EuroSign, dead_currency ] }; // e E € ¤
key <AC05> { [ comma, semicolon, rightsinglequotemark, dead_horn ] }; // , ; ’ ̛
key <AC06> { [ c, C, copyright, U017F ] }; // c C © ſ
key <AC07> { [ t, T, thorn, THORN ] }; // t T þ Þ
key <AC08> { [ s, S, ssharp, U1E9E ] }; // s S ß ẞ
key <AC09> { [ r, R, registered, trademark ] }; // r R ® ™
key <AC10> { [ n, N, dead_tilde ] }; // n N ~
key <AC11> { [ m, M, dead_macron, masculine ] }; // m M ̄ º
key <BKSL> { [ ccedilla, Ccedilla, dead_cedilla, dead_belowcomma ] }; // ç Ç ¸ ,
// Fourth row
key <LSGT> { [ ecircumflex, Ecircumflex, slash ] }; // ê Ê /
key <AB01> { [ agrave, Agrave, backslash ] }; // à À \
key <AB02> { [ y, Y, braceleft, leftsinglequotemark ] }; // y Y { ‘
key <AB03> { [ x, X, braceright, rightsinglequotemark ] }; // x X } ’
key <AB04> { [ period, colon, ellipsis, periodcentered ] }; // . : … ·
key <AB05> { [ k, K, asciitilde ] }; // k K ~
key <AB06> { [ apostrophe, question, questiondown, dead_hook ] }; // ' ? ¿ ̉
key <AB07> { [ q, Q, dead_abovering, dead_belowdot ] }; // q Q ˚ ̣
key <AB08> { [ g, G, dead_greek ] }; // g G µ
key <AB09> { [ h, H, dagger, doubledagger ] }; // h H † ‡
key <AB10> { [ f, F, dead_ogonek, ordfeminine ] }; // f F ̨ ª
key <SPCE> { [ space, nobreakspace, underscore, U202F ] }; // ␣ (espace insécable) _ (espace insécable fin)
};
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┲━━━━━━━━━━━━━━━┓
// │ # ¶ │ 1 „ │ 2 “ │ 3 ” │ 4 ≤ │ 5 ≥ │ 6 │ 7 ¬ │ 8 ¼ │ 9 ½ │ 0 ¾ │ ° ′ │ ` ″ ┃ ┃
// │ $ – │ " — │ « < │ » > │ ( [ │ ) ] │ @ ^ │ + ± │ - − │ / ÷ │ * × │ = ≠ │ % ‰ ┃ <-- ┃
// ┢━━━━━━━┷━━━┱───┴───┬───┴───┬───┴───┬───┴───┬───┴───┬───┴───┬───┴───┬───┴───┬───┴───┬───┴───┬───┴───┬───┺━━━┳━━━━━━━━━━━┫
// ┃ |<- ┃ Б ¦ │ Ы Ѝ │ П § │ О І │ Ь Ї │ ! │ В │ Д Ђ │ Л Љ │ Ж Ј │ З Ѕ │ Ш ┃ | ┃
// ┃ ->| ┃ б | │ ы ѝ │ п & │ о і │ ь ї │ № ¡ │ в ˇ │ д ђ │ л љ │ ж ј │ з ѕ │ ш ˘ ┃ <-' ┃b é p o è ^ v d l j z w
// ┣━━━━━━━━━━━┻━┱─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┺━┓ ┃
// ┃ ┃ А Ѣ │ У Ў │ И Й │ Е Ё │ ; ̛ │ Ц ſ │ Т Ћ │ С ẞ │ Р ™ │ Н Њ │ М º │ Щ Џ ┃ ┃
// ┃ CAPS ┃ а ѣ │ у ў │ и й │ е ё │ , ’ │ ц © │ т ћ │ с ß │ р ® │ н њ │ м ¯ │ щ џ ┃ ┃a u i e , c t s r n m ç
// ┣━━━━━━━┳━━━━━┹─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┲━━━━━┷━━━━━━━┻━━━━━━━━━┫
// ┃ ^ ┃ Э Є │ Я │ Ю ‘ │ Х ’ │ : · │ К Ќ │ ? ̉ │ Ъ ̣ │ Г Ѓ │ Ч Ґ │ Ф ª ┃ ^ ┃
// ┃ | ┃ э є │ я \ │ ю { │ х } │ . … │ к ќ │ ' ¿ │ ъ ° │ г ѓ │ ч ґ │ ф ˛ ┃ | ┃ê à y x . k ' q g h f
// ┣━━━━━━━┻━━━┳━━━┷━━━━━┳━┷━━━━━━━╈━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━┳━┷━━━━━━━╈━━━━━━━┻━┳━━━━━━━━━┳━━━━━━━━━━━┫
// ┃ ┃ ┃ ┃ ␣ NNBSP ┃ ┃ ┃ ┃ ┃
// ┃ Ctrl ┃ WinG ┃ Alt ┃ ⍽ _ ┃ AltGr ┃ WinD ┃ WinM ┃ Ctrl ┃
// ┗━━━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━━━┛
// based on a keyboard map from http://forum.bepo.fr/viewtopic.php?id=695
partial alphanumeric_keys
xkb_symbols "bepo_latin9" {
// Restricts the fr(bepo) layout to latin9 symbols
include "fr(bepo)"
name[Group1]="French (Bepo, ergonomic, Dvorak way, Latin-9 only)";
// Second row
key <AD01> { [ Cyrillic_be, Cyrillic_BE, bar, brokenbar ] }; // б Б | ¦
key <AD02> { [ Cyrillic_yeru, Cyrillic_YERU, U045D, U040D ] }; // ы Ы ѝ Ѝ
key <AD03> { [ Cyrillic_pe, Cyrillic_PE, ampersand, section ] }; // п П & §
key <AD04> { [ Cyrillic_o, Cyrillic_O, Ukrainian_i, Ukrainian_I] }; // о О і І
key <AD05> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN, Ukrainian_yi, Ukrainian_YI ] }; // ь Ь ї Ї
key <AD06> { [ numerosign, exclam, exclamdown ] }; // № ! ¡
key <AD07> { [ Cyrillic_ve, Cyrillic_VE, dead_caron ] }; // в В ˇ
key <AD08> { [ Cyrillic_de, Cyrillic_DE, Serbian_dje, Serbian_DJE ] }; // д Д ђ Ђ
key <AD09> { [ Cyrillic_el, Cyrillic_EL, Cyrillic_lje, Cyrillic_LJE ] }; // л Л љ Љ
key <AD10> { [ Cyrillic_zhe, Cyrillic_ZHE, Cyrillic_je, Cyrillic_JE] }; // ж Ж ј Ј
key <AD11> { [ Cyrillic_ze, Cyrillic_ZE, Macedonia_dse, Macedonia_DSE ] }; // з З ѕ Ѕ
key <AD12> { [ Cyrillic_sha, Cyrillic_SHA, dead_breve ] }; // ш Ш ˘
// Third row
key <AC01> { [ Cyrillic_a, Cyrillic_A, U0463, U0462] }; // а А ѣ Ѣ
key <AC02> { [ Cyrillic_u, Cyrillic_U, Byelorussian_shortu, Byelorussian_SHORTU] }; // у У ў Ў
key <AC03> { [ Cyrillic_i, Cyrillic_I, Cyrillic_shorti, Cyrillic_SHORTI] }; // и И й Й
key <AC04> { [ Cyrillic_ie, Cyrillic_IE, Cyrillic_io, Cyrillic_IO] }; // е Е ё Ё
key <AC06> { [ Cyrillic_tse, Cyrillic_TSE, copyright, U017F ] }; // ц Ц © ſ
key <AC07> { [ Cyrillic_te, Cyrillic_TE, Serbian_tshe, Serbian_TSHE] }; // т Т ћ Ћ
key <AC08> { [ Cyrillic_es, Cyrillic_ES, ssharp, U1E9E] }; // с С ß ẞ
key <AC09> { [ Cyrillic_er, Cyrillic_ER, registered, trademark ] }; // р Р ® ™
key <AC10> { [ Cyrillic_en, Cyrillic_EN, Cyrillic_nje, Cyrillic_NJE] }; // н Н њ Њ
key <AC11> { [ Cyrillic_em, Cyrillic_EM, dead_macron, masculine ] }; // м М ¯ º
key <BKSL> { [ Cyrillic_shcha, Cyrillic_SHCHA, Cyrillic_dzhe, Cyrillic_DZHE] }; // щ Щ џ Џ
// Fourth row
key <LSGT> { [ Cyrillic_e, Cyrillic_E, Ukrainian_ie, Ukrainian_IE ] }; // э Э є Є
key <AB01> { [ Cyrillic_ya, Cyrillic_YA, backslash ] }; // я Я \
key <AB02> { [ Cyrillic_yu, Cyrillic_YU, braceleft, leftsinglequotemark ] }; // ю Ю { ‘
key <AB03> { [ Cyrillic_ha, Cyrillic_HA, braceright, rightsinglequotemark ] }; // х Х } ’
key <AB05> { [ Cyrillic_ka, Cyrillic_KA, Macedonia_kje, Macedonia_KJE ] }; // к К ќ Ќ
key <AB07> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, dead_abovering, dead_belowdot ] }; // ъ Ъ ° ̣
key <AB08> { [ Cyrillic_ghe, Cyrillic_GHE, Macedonia_gje, Macedonia_GJE ] }; // г Г ѓ Ѓ
key <AB09> { [ Cyrillic_che, Cyrillic_CHE, Ukrainian_ghe_with_upturn, Ukrainian_GHE_WITH_UPTURN ] }; // ч Ч ґ Ґ
key <AB10> { [ Cyrillic_ef, Cyrillic_EF, dead_ogonek, ordfeminine ] }; // ф Ф ˛ ª
/usr/share/X11/xkb/symbols/bd
) and it seems that the characters are hardcoded to the keypositions in a keyboard. The keyboard itself assumes to be a QWERTY keyboard(macbook pro). So I guess one of the ways could be is to change the individual keymappings from QWERTY to dvorak.