1SETKEYCODES(8)                 Keyboard Support                 SETKEYCODES(8)
2
3
4

NAME

6       setkeycodes - load kernel scancode-to-keycode mapping table entries
7

SYNOPSIS

9       setkeycodes scancode keycode ...
10

DESCRIPTION

12       The setkeycodes command reads its arguments two at a time, each pair of
13       arguments consisting of a scancode (given in hexadecimal) and a keycode
14       (given  in  decimal).  For each such pair, it tells the kernel keyboard
15       driver to map the specified scancode to the specified keycode.
16
17       This command is useful only for people with slightly unusual keyboards,
18       that  have  a few keys which produce scancodes that the kernel does not
19       recognize.
20
21

THEORY

23       The usual PC keyboard produces a series of scancodes for each key press
24       and  key  release. (Scancodes are shown by showkey -s, see showkey(1).)
25       The kernel parses this stream of scancodes, and converts it to a stream
26       of  keycodes  (key  press/release  events).   (Keycodes  are  shown  by
27       showkey.)  Apart from a few scancodes with special meaning,  and  apart
28       from  the sequence produced by the Pause key, and apart from shiftstate
29       related scancodes, and apart from the key up/down bit,  the  stream  of
30       scancodes consists of unescaped scancodes xx (7 bits) and escaped scan‐
31       codes e0 xx (8+7 bits).  It is hardwired in the current kernel that  in
32       the  range  1-88 (0x01-0x58) keycode equals scancode. For the remaining
33       scancodes (0x59-0x7f) or scancode pairs (0xe0 0x00 - 0xe0 0x7f) a  cor‐
34       responding  keycode can be assigned (in the range 1-127).  For example,
35       if you have a Macro key that produces e0 6f  according  to  showkey(1),
36       the command
37              setkeycodes e06f 112
38       will  assign the keycode 112 to it, and then loadkeys(1) can be used to
39       define the function of this key.
40
41       USB keyboards have standardized keycodes and setkeycodes doesn't affect
42       them at all.
43
44

OPTIONS

46       None.
47

BUGS

49       The keycodes of X have nothing to do with those of Linux.  Unusual keys
50       can be made visible under Linux, but not under X.
51
52       setkeycodes affects only the "first" input device that  has  modifiable
53       scancode-to-keycode  mapping.   If  there is more than one such device,
54       setkeycodes cannot change the mapping of other devices than the "first"
55       one.
56
57

SEE ALSO

59       dumpkeys (1), loadkeys (1), showkey (1), getkeycodes (8)
60
61
62
63
64
65Local                             8 Nov 1994                    SETKEYCODES(8)
Impressum