3 keymap \- keyboard maps
8 is the compressed mapping from keyboard scan codes to ASCII.
9 It is made from a keymap source file consisting of MAP_COLS columns
10 (MINIX assigns the value 6 to MAX_COLS, corresponding to key pressed,
11 key+SHIFT, key+LEFT_ALT, key+RIGHT_ALT, key+ALT+SHIFT and key+CTRL) and
12 NR_SCAN_CODES rows (MINIX assigns the value 0xE8 to NR_SCAN_CODES,
13 corresponding to the range of defined USB HID key codes, which is the
14 set of key codes that is to be provided by all keyboard drivers),
15 and each element is 2 bytes in length (see u16_t in type definitions).
16 The low order byte corresponds to the character represented by the scan
17 code, and the high order byte corresponds to the special meaning (when
18 CAPS LOCK has effect, if it is a function key, etc.), which is converted to
19 binary keymap format using the
23 .SS "Types (general): <sys/types.h>"
24 <sys/types.h> defines the
28 types, corresponding to 8 and 16 bit values.
29 .SS "Keys: <minix/input.h>"
30 This header file contains the list of keys, prefixed by a
34 macro (see below) automatically adds the
36 prefix to the given key name. Input types from pages other than the key page
37 are not supported by TTY.
38 .SS "Macros: <minix/keymap.h>"
41 Maps to the entry for the key in the bitmap
43 .BI "C(" c ") - Control"
49 .BI "CA(" c ") - Control-Alt"
53 .BI "L(" c ") - Caps Lock"
56 These macros are used in a keymap source file to help define keys. So
59 to put a CTRL-Z in the map you write
63 macro is used in column 0 to tell that the Caps Lock key is active for this
64 key. (Caps Lock should only have effect on letters.)
65 Similarly, some keys in column 0 have a
67 prefix to indicate that they are affected by the Num Lock key.
68 .SS "Definitions: <minix/keymap.h>"
69 <minix/keymap.h> contains a large number of definitions for special keys,
70 like function keys, and keys on the numeric keypad. They are:
89 .BR MID " (numeric '5'),"
90 .BR MIN " (only with " A " or " C " prefix),"
95 Special keys affected by Num Lock:
112 .BR CALOCK " (Caps Lock),"
113 .BR NLOCK " (Num Lock),"
114 .BR SLOCK " (Scroll Lock)."
128 SHIFT - function key:
132 ALT - SHIFT - function key:
136 .SS "Creating/changing keyboard mapping"
137 You can create your own keyboard mapping by copying one of the existing
138 keymap source files (Standard Minix:
139 .BR drivers/tty/keymaps/*.src )
140 and modifying the desired keys. Once this has been done, you need to
141 recompile the genmap.c file, either by adding a new entry to the Makefile,
142 or by running the following commands:
146 cc -DKEYSRC=\e"\fIkeymap\fP.src\e" genmap.c
152 file can be generated by running:
155 .BI "a.out > " keymap .map
158 The keymap can be loaded in the keyboard driver by:
161 .BI "loadkeys " keymap .map
164 It is wise to first run
166 on one of the maps in
168 so that you can easily revert back to a known keymap with a few taps on the
169 up-arrow key and pressing return. You will otherwise have to fix the keymap
170 with a faulty keymap loaded into the keyboard driver, which is no fun.
172 When the keymap is to your satisfaction you can copy it to
174 to have it loaded automatically at reboot.
182 Victor A. Rodriguez - El bit Fantasma (Bit-Man@Tasa.Com.AR)