174 lines
6.0 KiB
HTML
174 lines
6.0 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>keymap(5)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>keymap(5)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
keymap - keyboard maps
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>/etc/keymap</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>/etc/keymap</STRONG> is the compressed mapping from keyboard scan codes to ASCII.
|
|
It is made from a keymap source file consisting of MAP_COLS columns
|
|
(MINIX assigns the value 6 to MAX_COLS, corresponding to key pressed,
|
|
key+SHIFT, key+LEFT_ALT, key+RIGHT_ALT, key+ALT+SHIFT and key+CTRL) and
|
|
NR_SCAN_CODES rows (MINIX assigns the value 0x80 to NR_SCAN_CODES,
|
|
corresponding to the number of scan codes to be provided by the
|
|
keyboard), and each element is 2 bytes in length (see u16_t in type
|
|
definitions). The low order byte corresponds to the character represented
|
|
by the scan code, and the high order byte corresponds to the special
|
|
meaning (when CAPS LOCK has effect, if it is a function key, etc.), which
|
|
is converted to binary keymap format using the <STRONG>genmap</STRONG> utility.
|
|
|
|
<STRONG>Types</STRONG> <STRONG>(general):</STRONG> <STRONG><sys/types.h></STRONG>
|
|
<sys/types.h> defines the <STRONG>u8_t</STRONG> and <STRONG>u16_t</STRONG> types, corresponding to 8 and 16
|
|
bit values.
|
|
|
|
<STRONG>Macros:</STRONG> <STRONG><minix/keymap.h></STRONG>
|
|
|
|
<STRONG>C(</STRONG><EM>c</EM><STRONG>)</STRONG> <STRONG>-</STRONG> <STRONG>Control</STRONG>
|
|
Maps to control code
|
|
|
|
<STRONG>A(</STRONG><EM>c</EM><STRONG>)</STRONG> <STRONG>-</STRONG> <STRONG>Alt</STRONG>
|
|
Sets the eight bit
|
|
|
|
<STRONG>CA(</STRONG><EM>c</EM><STRONG>)</STRONG> <STRONG>-</STRONG> <STRONG>Control</STRONG>-<STRONG>Alt</STRONG>
|
|
Short for <STRONG>A(C(</STRONG><EM>c</EM><STRONG>))</STRONG>
|
|
|
|
<STRONG>L(</STRONG><EM>c</EM><STRONG>)</STRONG> <STRONG>-</STRONG> <STRONG>Caps</STRONG> <STRONG>Lock</STRONG>
|
|
Adds Caps Lock effect
|
|
|
|
These macros are used in a keymap source file to help define keys. So
|
|
instead of writing <STRONG>032</STRONG> to put a CTRL-Z in the map you write <STRONG>C('Z')</STRONG>. The
|
|
<STRONG>L(</STRONG><EM>c</EM><STRONG>)</STRONG> macro is used in column 0 to tell that the Caps Lock key is active
|
|
for this key. (Caps Lock should only have effect on letters.)
|
|
|
|
<STRONG>Definitions:</STRONG> <STRONG><minix/keymap.h></STRONG>
|
|
<minix/keymap.h> contains a large number of definitions for special keys,
|
|
like function keys, and keys on the numeric keypad. They are:
|
|
|
|
Escape key and modifiers: <STRONG>EXT</STRONG>, <STRONG>CTRL</STRONG>, <STRONG>SHIFT</STRONG>, <STRONG>ALT</STRONG>.
|
|
|
|
|
|
|
|
Numeric keypad keys: <STRONG>HOME</STRONG>, <STRONG>END</STRONG>, <STRONG>UP</STRONG>, <STRONG>DOWN</STRONG>, <STRONG>LEFT</STRONG>, <STRONG>RIGHT</STRONG>, <STRONG>PGUP</STRONG>, <STRONG>PGDN</STRONG>, <STRONG>MID</STRONG>
|
|
(numeric '5'), <STRONG>PLUS</STRONG>, <STRONG>INSRT</STRONG>.
|
|
|
|
ALT + numpad key: <STRONG>AHOME</STRONG>, <STRONG>AEND</STRONG>, ..., <STRONG>AINSRT</STRONG>.
|
|
|
|
CTRL + numpad: <STRONG>CHOME</STRONG>, <STRONG>CEND</STRONG>, ..., <STRONG>CINSRT</STRONG>.
|
|
|
|
Lock keys: <STRONG>CALOCK</STRONG> (Caps Lock), <STRONG>NLOCK</STRONG> (Num Lock), <STRONG>SLOCK</STRONG> (Scroll Lock).
|
|
|
|
Function keys: <STRONG>F1</STRONG>, ..., <STRONG>F12</STRONG>.
|
|
|
|
ALT - function key: <STRONG>AF1</STRONG>, ..., <STRONG>AF12</STRONG>.
|
|
|
|
CTRL - function key: <STRONG>CF1</STRONG>, ..., <STRONG>CF12</STRONG>.
|
|
|
|
SHIFT - function key: <STRONG>SF1</STRONG>, ..., <STRONG>SF12</STRONG>.
|
|
|
|
ALT - SHIFT - function key: <STRONG>ASF1</STRONG>, ..., <STRONG>ASF12</STRONG>.
|
|
|
|
There is one key definition that isn't a key at all: <STRONG>EXTKEY</STRONG>. This
|
|
keycode is sent by the keyboard as an indicator that the next keycode is
|
|
special. For instance both ALT keys have the same keycode, but the right
|
|
ALT key is sent by the keyboard preceded by the EXTKEY keycode. The same
|
|
is true for the '/' key on the numeric pad versus the other '/' key on
|
|
the US keyboard. (On other keyboards this key may have a different
|
|
symbol.) The keyboard driver knows that a different key is presses if it
|
|
is preceded by EXTKEY.
|
|
|
|
<STRONG>Creating/changing</STRONG> <STRONG>keyboard</STRONG> <STRONG>mapping</STRONG>
|
|
You can create your own keyboard mapping by copying one of the existing
|
|
keymap source files (Standard Minix: <STRONG>kernel/keymaps/*.src</STRONG>, Minix-vmd:
|
|
<STRONG>kernel/ibm/keymaps/*.src</STRONG>) and modifying the desired keys. Once this has
|
|
been done, you need to recompile the genmap.c file, either by adding a
|
|
new entry to the Makefile, or by running the following commands:
|
|
|
|
<STRONG>cc</STRONG> <STRONG>-DKEYSRC=\"</STRONG><EM>keymap</EM><STRONG>.src\"</STRONG> <STRONG>genmap.c</STRONG>
|
|
|
|
After this, the <STRONG>keymap</STRONG> file can be generated by running:
|
|
|
|
<STRONG>a.out</STRONG> <STRONG>></STRONG> <EM>keymap</EM><STRONG>.map</STRONG>
|
|
|
|
The keymap can be loaded in the keyboard driver by:
|
|
|
|
<STRONG>loadkeys</STRONG> <EM>keymap</EM><STRONG>.map</STRONG>
|
|
|
|
It is wise to first run <STRONG>loadkeys</STRONG> on one of the maps in <STRONG>/usr/lib/keymaps</STRONG>
|
|
so that you can easily revert back to a known keymap with a few taps on
|
|
the up-arrow key and pressing return. You will otherwise have to fix the
|
|
keymap with a faulty keymap loaded into the keyboard driver, which is no
|
|
fun.
|
|
When the keymap is to your satisfaction you can copy it to <STRONG>/etc/keymap</STRONG> to
|
|
have it loaded automatically at reboot.
|
|
|
|
|
|
</PRE>
|
|
<H2>FILES</H2><PRE>
|
|
|
|
<STRONG>/etc/keymap</STRONG> Default keymap file
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG>loadkeys</STRONG> <STRONG>(1).</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHOR</H2><PRE>
|
|
Victor A. Rodriguez - El bit Fantasma (Bit-Man@Tasa.Com.AR)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|