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

loadkeys.1 (5655B)


  1. .\" @(#)loadkeys.1
  2. .TH LOADKEYS 1 "6 Feb 1994" "kbd"
  3. .SH NAME
  4. loadkeys \- load keyboard translation tables
  5. .SH SYNOPSIS
  6. .B loadkeys
  7. [
  8. .I -a --ascii
  9. ] [
  10. .I -b --bkeymap
  11. ] [
  12. .I -c --clearcompose
  13. ] [
  14. .I -C '<FILE>'
  15. |
  16. .I --console=<FILE>
  17. ] [
  18. .I -d --default
  19. ] [
  20. .I -h --help
  21. ] [
  22. .I -m --mktable
  23. ] [
  24. .I -p --parse
  25. ] [
  26. .I -q --quiet
  27. ] [
  28. .I -s --clearstrings
  29. ] [
  30. .I -u --unicode
  31. ] [
  32. .I -v --verbose
  33. ] [
  34. .I -V --version
  35. ] [
  36. .I filename...
  37. ]
  38. .LP
  39. .SH DESCRIPTION
  40. .IX "loadkeys command" "" "\fLloadkeys\fR command"
  41. .LP
  42. The program
  43. .B loadkeys
  44. reads the file or files specified by
  45. .IR filename... .
  46. Its main purpose is to load the kernel keymap for the console.
  47. You can specify console device by the
  48. .I -C
  49. (or
  50. .I --console
  51. ) option.
  52. .SH "RESET TO DEFAULT"
  53. If the
  54. .I -d
  55. (or
  56. .I --default
  57. ) option is given,
  58. .B loadkeys
  59. loads a default keymap, probably the file
  60. .I defkeymap.map
  61. either in
  62. .I /share/kbd/keymaps
  63. or in
  64. .IR /usr/src/linux/drivers/char .
  65. (Probably the former was user-defined, while the latter
  66. is a qwerty keyboard map for PCs - maybe not what was desired.)
  67. Sometimes, with a strange keymap loaded (with the minus on
  68. some obscure unknown modifier combination) it is easier to
  69. type `loadkeys defkeymap'.
  70. .SH "LOAD KERNEL KEYMAP"
  71. The main function of
  72. .B loadkeys
  73. is to load or modify the keyboard driver's translation tables.
  74. When specifying the file names, standard input can be denoted
  75. by dash (-). If no file is specified, the data is read from
  76. the standard input.
  77. .LP
  78. For many countries and keyboard types appropriate keymaps
  79. are available already, and a command like `loadkeys uk' might
  80. do what you want. On the other hand, it is easy to construct
  81. one's own keymap. The user has to tell what symbols belong
  82. to each key. She can find the keycode for a key by use of
  83. .BR showkey (1),
  84. while the keymap format is given in
  85. .BR keymaps (5)
  86. and can also be seen from the output of
  87. .BR dumpkeys (1).
  88. .SH "LOAD KERNEL ACCENT TABLE"
  89. If the input file does not contain any compose key definitions,
  90. the kernel accent table is left unchanged, unless the
  91. .I -c
  92. (or
  93. .I --clearcompose
  94. ) option is given, in which case the kernel accent table is emptied.
  95. If the input file does contain compose key definitions, then all
  96. old definitions are removed, and replaced by the specified new entries.
  97. The kernel accent table is a sequence of (by default 68) entries
  98. describing how dead diacritical signs and compose keys behave.
  99. For example, a line
  100. .LP
  101. .RS
  102. compose ',' 'c' to ccedilla
  103. .RE
  104. .LP
  105. means that <ComposeKey><,><c> must be combined to <ccedilla>.
  106. The current content of this table can be see
  107. using `dumpkeys \-\-compose\-only'.
  108. .SH "LOAD KERNEL STRING TABLE"
  109. The option
  110. .I -s
  111. (or
  112. .I --clearstrings
  113. ) clears the kernel string table. If this option is not given,
  114. .B loadkeys
  115. will only add or replace strings, not remove them.
  116. (Thus, the option \-s is required to reach a well-defined state.)
  117. The kernel string table is a sequence of strings
  118. with names like F31. One can make function key F5 (on
  119. an ordinary PC keyboard) produce the text `Hello!',
  120. and Shift+F5 `Goodbye!' using lines
  121. .LP
  122. .RS
  123. keycode 63 = F70 F71
  124. .br
  125. string F70 = "Hello!"
  126. .br
  127. string F71 = "Goodbye!"
  128. .RE
  129. .LP
  130. in the keymap.
  131. The default bindings for the function keys are certain
  132. escape sequences mostly inspired by the VT100 terminal.
  133. .SH "CREATE KERNEL SOURCE TABLE"
  134. If the
  135. .I -m
  136. (or
  137. .I --mktable
  138. ) option is given
  139. .B loadkeys
  140. prints to the standard output a file that may be used as
  141. .I /usr/src/linux\%/drivers\%/char\%/defkeymap.c,
  142. specifying the default key bindings for a kernel
  143. (and does not modify the current keymap).
  144. .SH "CREATE BINARY KEYMAP"
  145. If the
  146. .I -b
  147. (or
  148. .I --bkeymap
  149. ) option is given
  150. .B loadkeys
  151. prints to the standard output a file that may be used as a binary
  152. keymap as expected by Busybox
  153. .B loadkmap
  154. command (and does not modify the current keymap).
  155. .SH "UNICODE MODE"
  156. .B loadkeys
  157. automatically detects whether the console is in Unicode or
  158. ASCII (XLATE) mode. When a keymap is loaded, literal
  159. keysyms (such as
  160. .BR section )
  161. are resolved accordingly; numerical keysyms are converted to
  162. fit the current console mode, regardless of the way they are
  163. specified (decimal, octal, hexadecimal or Unicode).
  164. .LP
  165. The
  166. .I -u
  167. (or
  168. .IR --unicode )
  169. switch forces
  170. .B loadkeys
  171. to convert all keymaps to Unicode. If the keyboard is in a
  172. non-Unicode mode, such as XLATE,
  173. .B loadkeys
  174. will change it to Unicode for the time of its execution. A
  175. warning message will be printed in this case.
  176. .LP
  177. It is recommended to run
  178. .BR kbd_mode (1)
  179. before
  180. .B loadkeys
  181. instead of using the
  182. .I -u
  183. option.
  184. .SH "OTHER OPTIONS"
  185. .TP
  186. .B \-a \-\-ascii
  187. Force conversion to ASCII.
  188. .TP
  189. .B \-h \-\-help
  190. .B loadkeys
  191. prints its version number and a short usage message to the programs
  192. standard error output and exits.
  193. .TP
  194. .B \-p \-\-parse
  195. .B loadkeys
  196. searches and parses keymap without action.
  197. .TP
  198. .B \-q \-\-quiet
  199. .B loadkeys
  200. suppresses all normal output.
  201. .TP
  202. .B \-V \-\-version
  203. .B loadkeys
  204. prints version number and exits.
  205. .SH WARNING
  206. Note that anyone having read access to
  207. .B /dev/console
  208. can run
  209. .B loadkeys
  210. and thus change the keyboard layout, possibly making it unusable. Note
  211. that the keyboard translation table is common for all the virtual
  212. consoles, so any changes to the keyboard bindings affect all the virtual
  213. consoles simultaneously.
  214. .LP
  215. Note that because the changes affect all the virtual consoles, they also
  216. outlive your session. This means that even at the login prompt the key
  217. bindings may not be what the user expects.
  218. .SH FILES
  219. .TP
  220. .I /share/kbd/keymaps
  221. default directory for keymaps.
  222. .LP
  223. .TP
  224. .I /usr/src/linux/drivers/char/defkeymap.map
  225. default kernel keymap.
  226. .LP
  227. .SH "SEE ALSO"
  228. .BR dumpkeys (1),
  229. .BR keymaps (5)