Coptic Keyboard Mapping
This describes, how you can enter a Coptic Unicode Text (under X11). It explains:
- how you can set up your X11 session (mainly XFree86) and switch between several keyboards.
- it also explains, how you can use and set up the virtual keyboard (xvkbd) .
The key map file "cop"
XFree86 and other X11
implementations define the keyboard layout in a file that normally gets the same name as
the abbreviation of the language, for example "de" for German or "us" for English. In my
systems these files reside in the directory:
/usr/lib/X11/xkb/symbols/pc
In the/etc/X11/XF86Config file, there is
one section for each input device describing also the keyboard parameters (language,
variants, models...), in XFree86 it looks like:
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbVariant" "nodeadkeys"
EndSectionDriver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbVariant" "nodeadkeys"
It is the task of the file /usr/lib/X11/xkb/symbols/pc/de in the example above to define a default key mapping to German and in addition all the different variants (keyboard model, variants,...).
I have prepared a similar file for Coptic. It follows the encoding suggested by Logos Research Systems. You can get a detailed document describing their exact layout from:http://www.logos.com/support/lbs/fonts/CopticKeyboard.
They also offer a Coptic layout prepared for WindowsXP for downloading. My X11 implementation follows the same layout for the normal, shifted, AltGr and shift+AltGr states. To install it, follow the following steps:
- download the cop file (if you are used to the old CS-Coptic encoding, you can
alternatively download the file cop_CS,
though I would recommend to stick to the cop file that follows the Logos
encoding).
- as root, copy it to /usr/lib/X11/xkb/symbols/pc (or similar, depending on your system)
- If you would like to try it out in your current X11 session, type in (as same user
who owns the X11 session): setxkbmap -layout "cop",
ATTENTION: once you have typed this, you will
not be able to type anything in latin anymore!! It is better to type before this in a
terminal something like: setxkbmap -layout "us", so that
you can use the up-arrow key in your X-terminal later and set the mapping back to "us".
Alternatively, you can type: setxkbmap -layout "us,cop" -option
"grp:alt_shift_toggle" which should allow toggling between "us" and "cop" key
maps with the simultaneous pressing of both <Alt> + <Shift> keys.
- To have this every time you start your X session, as root, add the following lines in the InputDevice section of your /etc/X11/XF86Config file:
Option
"XkbLayout" "us,cop"
Option "XKbOptions" "grp:ctrl_shift_toggle"
Option "XKbOptions" "grp:ctrl_shift_toggle"
Virtual Keyboard
There is another alternative way to make entering Unicode text possible, without the need of the above steps. Instead of hitting the keyboard with your fingers, you would rather click a virtual keyboard with the mouse. One such virtual keyboards is xvkbd (written by Tom Sato, and is distributed under the terms of the GNU General Public License). The main problem with this tool is, that it uses the Xaw (or Xaw3) widget tool kit (which is by itself very fine), but the Xaw tool kit does not seem to have a Unicode support. I have succeeded in implementing a workaround, that at least in the case of Coptic Unicode works fine tough with some limitations. So patching the source code will be necessary.You can have a look at some snapshots of the Coptic version of xkbrd:
Now, here are the detailed steps you should follow for installing xvkbd:
- first download the xkbrd version: 2.7a from xkbrd home page. You can also download newer versions, but the patch I have written is based on the version 2.7a.
- download the patch I have prepared: xvkbd-2.7a-Coptic.patch.
- download and install for example the TTF font New Athena
Unicode. Follow these steps for installing
the font.
- untar the file xvkbd-2.7a.tar.gz
- apply the patch, for example if you change directory one level above xvkbd-2.7a,
type in:
-
- patch -p0 < xvkbd-2.7a-Coptic.patch
- follow the steps described in the directory xvkbd-2.7a for making and installing xvkbd ( xmkmf; make install)
- copy the file XVkbd-coptic.ad into the app default directory (if it should be accessible for all users: /usr/X11R6/lib/X11/app-defaults, otherwise if only for you: $HOME/app-defaults, and define this directory in your rc file of the shell you use, i.e.: setenv XAPPLRESDIR $HOME/app-defaults for (t)csh or export XAPPLRESDIR=$HOME/app-defaults for bash).
- Make sure that the file XVkbd in your app default directory includes both
lines:
#include "XVkbd-common"
#include "XVkbd-coptic.ad" - If the key labels looks very weird when you start xvkbd, then either
the font is not installed correctly, or the patch was not applied. Try "xlsfonts | grep athena" , if
this does not output anything, then the font is not installed.
last updated: 15.02.2007
Moheb Mekhaiel

