Generic keyboard input methods: xkb

xkb is the X keyboard extension [44] that allows users to extensively remap the keyboard for their own purposes. A configuration guide for xkb is available [45], as well as enhancements to the configuration [46]. xkb keyboard configurations can be loaded directly from the configuration file for X, /etc/X11/XF86Config, or can be manually installed using setxkbmap.

An Oriya Inscript keymap from G. Karunakar is installed with PCQLinux 2004. We have combined this with another xkb configuration from D. Holl to form an enhanced Oriya Inscript map, oriya_inscript.xkb [47]. Instructions for installing this map are also included in the comments at the beginning of this file. You will need to have XFree86 version 4.3.0 or higher for this keymap to work. (You can check the XFree86 version number at the top of the log file, usually /var/log/XFree86.0.log.)

Uncompress the file, ori_inscript.gz,1 and copy it to /etc/X11/xkb/symbols/pc. Thus, as super-user, do


  gzip -d ori_inscript.gz
  cp ori_inscript /etc/X11/xkb/symbols/pc/ori_inscript
You can manually install the keymap, but this will have to be done each time that you log in to X. After copying the xkb keymap file, as the user logged into X, type

  setxkbmap -rules xfree86 -model pc104 -layout "us,ori_inscript"
    -option "grp:alt_shift_toggle" -option "lv3:switch"
This installs two keymaps: the standard ``us'' one, and the ``ori_inscript'' keymap above, and one can toggle between the two by pressing the Alt and Shift keys simultaneously. The ``pc104'' argument describes the model of my keyboard, which is quite commonly used. You can find the exact model of your particular keyboard by looking for a line containing ``XkbModel'' in the XFree86 configuration file, usually /etc/X11/XF86Config, and in any case the normal layouts are similar for most keyboards. The final ``-option lv3:switch'' allows you to use the right-hand Control key to switch to the third and fourth levels of the keyboard layouts; the first level being the normal (unshifted) layout, and the second one being accessed with the Shift key. While the ori_inscript map does define useful values for the higher levels, we leave discussion of these to a later version of this primer.

You can edit your XFree86 configuration file to automatically install the Oriya keymap each time that a user logs in. To do so, find the part of the file dealing with the keyboard, which should look something like:

  Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
    Option      "XkbRules"    "xfree86"
    Option      "XkbModel"    "pc104"
    Option      "XkbLayout"   "us"
    ...
  EndSection
Make sure that ``xfree86'' is the option on the ``XkbRules'' line. The option for ``XkbModel'' might be different for your keyboard: leave it unchanged. Modify the ``XkbLayout'' line, and add other options so that the final entry looks something like:
  Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
    Option      "XkbRules"    "xfree86"
    Option      "XkbModel"    "pc104"
    Option      "XkbLayout"   "us,ori_inscript"
    Option      "XkbOptions"  "grp:alt_shift_toggle"
    Option      "XkbOptions"  "lv3:switch"
    ...
  EndSection
Save the file and restart X in order for the changes to take effect. A word of caution for the unwary: in the middle of happily typing away in Oriya, it is easy to forget that the keyboard layout has been switched. So, if you are typing in a non-Unicode application and are getting no output or some garbage, press Alt+Shift to toggle the keyboard layout back to normal. See the next section for a more easily visible way to toggle keyboard layouts under GNOME and KDE. xkb only allows a one-to-one mapping of input and output keys, so that the pre-formed conjuncts in the Inscript layout cannot be made available here. People are working on a project called the Internet/Intranet Input Method Framework (IIIMF) [48] which is a next-generation multingual Unicode input framework. It is also intended to be independent of operating platform and windowing system. I am in the process of investigating this.

Subsections
Gora Mohanty 2004-07-24