Jim's Site
 Climbing & Walking 
 Macaroni Penguins 
 Photo Gallery 
   Recommended Links 

Jim's Tips: Special Characters in X11

Last Updated: Wed Nov 15 15:38:00 GMT 2006

Special Characters in X11

Platform: Linux 2.2.x, Linux 2.4.x, UNIX
Requirements: XFree86 3.3.3, 3.3.5, 3.3.6, 4.0.1

Enabling a "Multi" Key

Note: If you don't want to assign a special "Multi" key, you can use the default X11 key binding of <Ctrl-Shift-T> (providing the application you're using doesn't already use it for something else), and skip straight to the next section: Using the "Multi" Key.

First you need to enable a "Multi" key. I use Caps Lock, because a long time ago I discovered that Caps Lock was more useful disabled than enabled. Several of my colleagues popped the keycap off, but I prefered a software solution and turned to xmodmap.

Place the following lines in ~/.Xmodmap:

! clear caps lock & make it into the multi key
remove lock = Caps_Lock
keycode 66 = Multi_key

(If you just want to disable Caps Lock just put the "remove" line in).

You can check the keycode of the Caps Lock key using the xev application (or if you want use a different key as the "Multi" key like the Windows keys or the Menu key).

Some X11 environments will read ~/.Xmodmap when you start them up, others will need to have the following line added to the start-up file (often ~/.xsession):

xmodmap $HOME/.Xmodmap

Or you can just type it into a terminal to enable it immediately.

Using the "Multi" Key

You can now use the "Multi" key to generate special characters in X11, for example:

Key Sequence Character
Multi a " ä (adiaeresis)
Multi c , ç (ccedilla)
Multi e ' é (eacute)
Multi i ^ î (icurcumflex)
Multi n ~ ñ (ntilde)
Multi o / ø (oslash)
Multi u ` ù (ugrave)
Multi Y = ¥ (yen)
Multi 3 4 ¾ (threequarters)
Multi ^ 0 ° (degree)

For a full list of key sequences and the characters they produce see the file locale/iso8859-1/Compose on your system (usually under /usr/X11R6/lib/X11 or /usr/share/X11).

All information on this site is copyright © 1994-2016 Jim Randell