------------------------------------------------------------------------------- Assigning New Keysyms The Following is the way to assign a Key Symbol to a Particular Key. And what it really is all about. This Example is assigning a Keysym to the `Remove' Key on some sun keyboards which sun sets to `Dead_Grave' by default. First, pick a hex keysym that is free, such as 0x1000ff05. Assign this to keycode 100 (the `Remove' keys return value). xmodmap -e 'keycode 100 = 0x1000ff05' Next, make sure you have a file /usr/lib/X11/XKeysymDB that includes the line Or look in that file for other key symbols you may map the key to. Remove: 0x1000FF05 Now, use xmodmap to assign the string keysym to the hex keysym, xmodmap -e 'keysym 0x1000ff05 = Remove' or more directly xmodmap -e 'keycode 100 = Remove' ------------------------------------------------------------------------------- Compose Key a.k.a. Multi_Key Many users are on a keyboard layout which does not allow to type other characters than those printed on the keys. There are some workarounds with so-called "deadkeys" so that you can type characters with accents, but that does not enable you to type all characters in your locale. On many Unix-machines you can find a "Compose Key" on the attached keyboard. With that special key you can "compose" the desired character. For instance, typing the sequence <"> will result in the Umlaut ä. Or take for a danish ø. With X it is no problem to declare any key as the Compose Key, or "Multi_Key" as it is called in the internal routines. Just remember that a keyboard sends only keycodes, and that it is unimportant which keycode represents a given character or special key. To enable the Compose Key you have to alter your /etc/X11/xorg.conf. There are other ways, like using xmodmap, but the global configuration with the xorg.conf ensures that the Compose Key will be available to all users. I recommend the right "Windows Key" (just one of the two on your keyboard enabled should be enough): Code Listing 8.1: Enable the Compose Key in the xorg.conf # Your section in xorg.conf about the keyboard looks similar to this: Section "InputDevice" Identifier "Keyboard0" Driver "kbd" Option "XkbModel" "pc104" Option "XkbLayout" "us" Option "XkbOptions" "compose:rwin" EndSection After you restart X, you should be able to type the characters in the example above. A complete list of available Compose Key characters with their description can be found in the file /usr/X11R6/lib/X11/locale//Compose. -------------------------------------------------------------------------------