Download Print this page

Step 3: Compile Keymap - HP T5135 - Compaq Thin Client Introduction Manual

Creating and compiling custom keymaps for linux
Hide thumbs Also See for T5135 - Compaq Thin Client:

Advertisement

Save and exit the xfree86 file and open <base>/symbols/us.
5.
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.
For a simple modification such as this one, you can add a new keyboard declaration to the us symbol
file instead of creating a new symbol file. Go to the end of the us file and add the following lines
directly below the '};' line that closes out the previous symbol declaration:
xkb_symbols "my_keys" {
include "us(pc105)"
key <AE04> { [ 4, yen ] };
};
The include line declares that this symbol definition will inherit all the keys declared by the symbol
definition pc105 in the symbol file us.
If you trace the include lines from the declarations you will see that it inherits most of its keys from
us(basic) which contains all the letters and number keys and us(generic101), which contains
most of the control and auxiliary keys. It can be very helpful when creating a new keymap to look at
existing symbol declarations, such as these, to see what the symbol declarations should look like.
The key line below the include line declares a new key name to symbol mapping. It will take the
key <AE04> and map it to the symbol 4 normally, or yen when the Shift key is pressed.
The alphanumeric section of the keyboard is referred to as <Ax##>, where x is a row letter starting
with the row (A) where the space bar is located, and ## is a number starting from the left side of the
keyboard (ignoring the special keys like the left single-quotation mark/tilde key [` or ~]), Tab, Shift,
etc. Using this convention, the E key is <AD03>, the forward slash (/) key is <AB10> and the numeral
5 key is <AE05>. The special keys all have their own names such as <SPCE> for the spacebar,
<TLDE> for the left single-quotation mark/tilde key key (` or ~) and <L_ALT> for the left alt key.
These keys are all defined in <base>/keycode/xfree86. When a keyboard key is pressed it
generates a integer called a keycode; keycodes are mapped to key names by the keycode file
declared on the line:
xkb_keycodes
in the keymap declaration.
If you are unsure as to what the name for a key is, the best way to find out is to look at a symbol
declaration for a keyboard you know and find where the key is declared. For example, if you did not
know what the key for the backslash was called (usually right above the Enter key on a standard us
keyboard), you could look for 'backslash' in the us(basic) symbol declaration, and on line 258 find
that it's called <BKSL>.
You could also do this in reverse to find what the symbol is called. For example, if you knew that on a
French keyboard the 12
pressed with the Shift key, but didn't know what to call that symbol, you could look for <AD12> in
<base>/symbols/fr and find that it is called sterling.

Step 3: Compile keymap

Now that you have created a new keymap and symbol declaration you are ready to compile the
keymap. This is done via this command:
{ include "xfree86"
th
key on the 4
th
row from the bottom <AD12> created a £ symbol when
};
3

Advertisement

loading

This manual is also suitable for:

T5145 - thin client - towerCreating and compiling custom keymaps for linux