Creating and Compiling Custom Keymaps for Linux Introduction ............................2 Step 1: Retrieve keymap sources ......................2 Step 2: Modify keymap and symbols ..................... 2 Step 3: Compile keymap ........................3 Step 4: Install the new keymap ......................4 More knowledge ..........................4 Declare symbol using unicode ......................
Introduction HP thin clients running the ThinConnect operating system use compiled keymaps to reduce the amount of flash disk space required to support a large set of international keyboards. This white paper describes the basic steps involved in creating custom keymaps for keyboards that are not supported by default under ThinConnect.
Save and exit the xfree86 file and open <base>/symbols/us. This file contains declarations to map all the keyboard keys to symbols for the us keyboard. Other files in the <base>/symbols directory will map symbols for other keyboards. For example, <base>/symbols/de contains declarations for all the German symbols, and <base>/symbols/jp contains symbol declarations for 106 key Japanese keyboard.
xkbcomp –xkm –m <map> <keymap file> <destination file> For this example, the command is shown below: xkbcomp –xkm –m my_map /home/user/xkb-data-legacy-1.0.1/keymap/xfree86 /home/user/new_map.xkm After running the command you’ll likely see many warnings stating “No symbol defined for <xxx> (keycode yyy)”. Ignore these; xkbcomp will display warnings for any keycodes that were not declared, even if those keys are not present on the keyboard.
The first and easiest method is to go to a symbols declaration that you know uses the symbol and see what name it shows. For example, you know that the us keyboard layout has will display the | symbol when you press Shift+\. You can look through the symbol declarations in <base>/symbols/us and see that <BKSL>...
xkb_keymap “fr” { xkb_keycodes { include “xfree86” xkb_types { include “default” xkb_compatibility { include “default” xkb_symbols { include “en_US(pc105)+fr” xkb_geometry { include “pc(pc102)” This keymap is almost identical to the standard us keymap, except that on the xkb_symbols line it has the symbol declaration en_US(pc105)+fr.