logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

setkeycodes.8 (2330B)


  1. .\" @(#)man/man8/setkeycodes.8 1.0 Nov 8 22:30:48 MET 1994
  2. .TH SETKEYCODES 8 "8 Nov 1994" "kbd"
  3. .SH NAME
  4. setkeycodes \- load kernel scancode-to-keycode mapping table entries
  5. .SH SYNOPSIS
  6. .B setkeycodes
  7. .I "scancode keycode ..."
  8. .SH DESCRIPTION
  9. The
  10. .I setkeycodes
  11. command reads its arguments two at a time, each pair of arguments
  12. consisting of a scancode (given in hexadecimal) and a keycode (given
  13. in decimal). For each such pair, it tells the kernel keyboard driver
  14. to map the specified scancode to the specified keycode.
  15. This command is useful only for people with slightly unusual keyboards,
  16. that have a few keys which produce scancodes that the kernel does not
  17. recognize.
  18. .SH THEORY
  19. The usual PC keyboard produces a series of scancodes for each
  20. key press and key release. (Scancodes are shown by
  21. \fBshowkey \-s\fP, see
  22. .BR showkey (1)
  23. ) The kernel parses this stream of scancodes, and converts it to
  24. a stream of keycodes (key press/release events).
  25. (Keycodes are shown by \fBshowkey\fP.)
  26. Apart from a few scancodes with special meaning, and apart from
  27. the sequence produced by the Pause key, and apart from shiftstate
  28. related scancodes, and apart from the key up/down bit,
  29. the stream of scancodes consists of unescaped
  30. scancodes xx (7 bits) and escaped scancodes e0 xx (8+7 bits).
  31. To these scancodes or scancode pairs, a corresponding keycode can be
  32. assigned (in the range 1-127).
  33. For example, if you have a Macro key that produces e0 6f according
  34. to
  35. .BR showkey (1),
  36. the command
  37. .RS
  38. .B "setkeycodes e06f 112"
  39. .RE
  40. will assign the keycode 112 to it, and then
  41. .BR loadkeys (1)
  42. can be used to define the function of this key.
  43. .LP
  44. Some older kernels might hardwire a low scancode range to the
  45. equivalent keycodes; setkeycodes will fail when you try to remap
  46. these.
  47. .SH "2.6 KERNELS"
  48. In 2.6 kernels key codes lie in the range 1-255, instead of 1-127.
  49. (It might be best to confine oneself to the range 1-239.)
  50. .LP
  51. In 2.6 kernels raw mode, or scancode mode, is not very raw at all.
  52. The code returned by showkey \-s will change after use of setkeycodes.
  53. A kernel bug. See also
  54. .BR showkey (1).
  55. .SH OPTIONS
  56. None.
  57. .SH BUGS
  58. The keycodes of X have nothing to do with those of Linux.
  59. Unusual keys can be made visible under Linux, but not under X.
  60. .SH "SEE ALSO"
  61. .BR dumpkeys (1),
  62. .BR loadkeys (1),
  63. .BR showkey (1),
  64. .BR getkeycodes (8)