Unijoy layout     «Computing»   «Home»   «Map&Rev»

 

XKB layout for Unicode Bengali for Linux

Unijoy layout
Click on the picture for a hgiehr-res vesion.

The Munier-Optima Typewriter keyboard, once the ubiquitous overlay especially in government offices, was a matter of interest with me back in the mid-1980s, but I never caught on touch-typing with it. The next Bengali keyboard overlay that I used to key in a character or two was of the DaungJan word processor, which offered a limited scope to type text in Bengali with a changed codepage for the Devanagari script. The dump screen of the DJ’s editing screen can be found «here» (png, 69kB).

In the mid-1990s, I had to learn how to type Bengali the proper way — no hunting and pecking. I learnt the Bijoy overlay in a day and started typing Bengali on computer. Things later moved to Unicode and I switched to Unijoy, an overlay modelled on Bijoy, some time before the mid-2000s. On Linux, I needed a Bengali keyboard overlay that could match the Unijoy layout.

I then designed a superset of both Bijoy and Unijoy. I useed the keyboard overlay to write Bengali on Slackware and Slax. I has no dead key — the full form of the vowels are mapped on to AltGr combinations and all other conjunct characters, explicitly visible or not, are keyed in with a virama between consonants. All that is needed to do do is to copy the symbol descriptions below into a file called xkbben and drop it onto /etc/X11/xkb/symbols — on a Slackware, or Slax, machine.


// XKBben Bengali keyboard overlay // based on Bijoy and Unijoy overlays // abu jar m akkas 2009 partial default alphanumeric_keys xkb_symbols "xkbengali" { name[Group1]= "xkbben"; key <TLDE> { [ 0x100200c, 0x100200d, 0x100200b, voidsymbol ] }; key <AE01> { [ 0x10009e7, 0x1000021, 0x10009f4, voidsymbol ] }; key <AE02> { [ 0x10009e8, 0x1000040, 0x10009f5, voidsymbol ] }; key <AE03> { [ 0x10009e9, 0x1000023, 0x10009f6, voidsymbol ] }; key <AE04> { [ 0x10009ea, 0x10009f3, 0x10009f7, voidsymbol ] }; key <AE05> { [ 0x10009eb, 0x1000025, 0x10009f2, voidsymbol ] }; key <AE06> { [ 0x10009ec, 0x10000f7, 0x100005e, voidsymbol ] }; key <AE07> { [ 0x10009ed, 0x1000981, 0x10009fa, voidsymbol ] }; key <AE08> { [ 0x10009ee, 0x10000d7, 0x100002a, voidsymbol ] }; key <AE09> { [ 0x10009ef, 0x1000028, voidsymbol, voidsymbol ] }; key <AE10> { [ 0x10009e6, 0x1000029, 0x10009f8, 0x1000970 ] }; key <AE11> { [ 0x100002d, 0x100005f, 0x10009f9, voidsymbol ] }; key <AE12> { [ 0x100003d, 0x100002b, 0x1002260, voidsymbol ] }; key <AD01> { [ 0x1000999, 0x1000982, 0x100098c, voidsymbol ] }; key <AD02> { [ 0x10009af, 0x10009df, 0x10009e1, voidsymbol ] }; key <AD03> { [ 0x10009a1, 0x10009a2, 0x1000988, voidsymbol ] }; key <AD04> { [ 0x10009aa, 0x10009ab, voidsymbol, voidsymbol ] }; key <AD05> { [ 0x100099f, 0x10009a0, voidsymbol, voidsymbol ] }; key <AD06> { [ 0x100099a, 0x100099b, voidsymbol, voidsymbol ] }; key <AD07> { [ 0x100099c, 0x100099d, 0x100098a, voidsymbol ] }; key <AD08> { [ 0x10009b9, 0x100099e, 0x1000990, 0x10009bd ] }; key <AD09> { [ 0x1000997, 0x1000998, 0x1000994, voidsymbol ] }; key <AD10> { [ 0x10009dc, 0x10009dd, voidsymbol, voidsymbol ] }; key <AD11> { [ 0x100005b, 0x100007b, voidsymbol, voidsymbol ] }; key <AD12> { [ 0x100005d, 0x100007d, voidsymbol, voidsymbol ] }; key <AC01> { [ 0x10009c3, voidsymbol, 0x100098b, voidsymbol ] }; key <AC02> { [ 0x10009c1, 0x10009c2, 0x1000989, voidsymbol ] }; key <AC03> { [ 0x10009bf, 0x10009c0, 0x1000987, voidsymbol ] }; key <AC04> { [ 0x10009be, 0x1000985, 0x1000986, voidsymbol ] }; key <AC05> { [ 0x10009cd, 0x1000964, voidsymbol, 0x1000965 ] }; key <AC06> { [ 0x10009ac, 0x10009ad, 0x10009f0, voidsymbol ] }; key <AC07> { [ 0x1000995, 0x1000996, voidsymbol, voidsymbol ] }; key <AC08> { [ 0x10009a4, 0x10009a5, voidsymbol, voidsymbol ] }; key <AC09> { [ 0x10009a6, 0x10009a7, voidsymbol, voidsymbol ] }; key <AC10> { [ 0x100003b, 0x100003a, 0x100201b, 0x100201f ] }; key <AC11> { [ 0x1002018, 0x1002019, 0x100201c, 0x100201d ] }; key <BKSL> { [ 0x1000983, 0x10009ce, 0x1000027, 0x1000022 ] }; key <AB01> { [ 0x1002013, 0x1002014, voidsymbol, 0x10009e2 ] }; key <AB02> { [ 0x10009cb, 0x10009cc, 0x1000993, 0x10009d7 ] }; key <AB03> { [ 0x10009c7, 0x10009c8, 0x100098f, 0x10009e0 ] }; key <AB04> { [ 0x10009b0, 0x10009b2, 0x10009f1, 0x10009e3 ] }; key <AB05> { [ 0x10009a8, 0x10009a3, voidsymbol, 0x10009c4 ] }; key <AB06> { [ 0x10009b8, 0x10009b7, voidsymbol, voidsymbol ] }; key <AB07> { [ 0x10009ae, 0x10009b6, voidsymbol, voidsymbol ] }; key <AB08> { [ 0x100002c, 0x100003c, 0x1000324, 0x1002264 ] }; key <AB09> { [ 0x100002e, 0x100003e, 0x10009bc, 0x1002265 ] }; key <AB10> { [ 0x100002f, 0x100003f, voidsymbol, voidsymbol ] }; modifier_map Shift { Shift_L, Shift_R }; include "level3(ralt_switch_multikey)" };

Slackware

After the symbol file is put into the symbol directory (/etc/X11/xkb/symbols), the fileneeds to be added to the xkb symbol file for the country intended — for Bangladesh, bd, or for India, in. As *nix does not allow more than four layouts at a time, it is better to add it to in if bd is the predominant layout and the other way round to have both the layouts loaded at a time.


// XKBben xkb_symbols "xkbben" { include "xkbben(xkbengali)" name[Group1]= "Bangladesh - XKBben"; };

Alternatively, if this layout should be the only layout needed, the symbol file could be renamed as bd, after backing up the original (shipped) file should occasions arise that it is needed in future.

The following snippet


<configItem> <name>xkbben</name> <description>XKB Bengali</description> <shortDescription>bn</shortDescription> <languageList><iso639Id>ben</iso639Id></languageList> </configItem> </variant> --------------- --------------- </variantList> </layout>

needs to be inserted in the following bd section of the evdev.xml, <variantList> and </variantList> anywhere as a variant, that resides on /etc/X11/xkb/rules


<layout> <configItem> <name>bd</name> <shortDescription>bn</shortDescription> <description>Bengali</description> <languageList> <iso639Id>ben</iso639Id> </languageList> </configItem> <variantList> <variant>

Note: I am not certain about this, but I needed to compile the symbol file by issuing the following command under /etc/X11/xkb


xkbcomp -lhlpR '*' ,,/symbols.dir [Enter]

The keyboard layout can be selected from >system settings | input device | keyboard, add Bengali as the language, Bengali (Bangladesh) as the layout and XKB Bengali as the variant. A restart of the x-window may be required.

Red Hat Linux

As this will act as an additional keyboard, the following five lines should be added to the xkb symbol file for the country intended — for Bangladesh, bd, or for India, in.


// XKBben xkb_symbols "xkbben" { include "xkbben(xkbengali)" name[Group1]= "Bangladesh - XKBben"; };

Into the symbols directory, the following command


xkbcomp -lhlpR '*' -o ../symbols.dir

should be issued for the rest of the processing. In the windowing environment, the keyboard could be selected from the KDE Control Menu by issuing the command


kcontrol

 

Rev.: vii·xi·mmxxii