kbmap 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. .TH KBMAP 3
  2. .SH NAME
  3. kbmap \- keyboard map
  4. .SH SYNOPSIS
  5. .nf
  6. .B bind -a #κ /dev
  7. .B /dev/kbmap
  8. .fi
  9. .SH DESCRIPTION
  10. .PP
  11. The
  12. .I kbmap
  13. device serves a one-level directory containing a single file,
  14. .BR kbmap ,
  15. representing the kernel's mapping of
  16. keyboard scan codes to Unicode characters
  17. (see
  18. .IR cons (3)
  19. and
  20. .IR keyboard (6)).
  21. .PP
  22. Reads return the current contents of the map.
  23. Each entry is one line containing three 11 character numeric fields, each followed by a space:
  24. a table number, an index into the table (scan code), and the decimal value
  25. of the corresponding Unicode character (0 if none).
  26. The table numbers are platform dependent; they typically distinguish
  27. between unshifted and shifted keys.
  28. The scan code values are hardware dependent and can vary
  29. from keyboard to keyboard.
  30. .PP
  31. Writes to the file change the map.
  32. Lines written to the file must contain three space-separated numeric fields,
  33. representing the table number, scan code index, and Unicode character.
  34. Values are taken to be decimal unless they start with
  35. .B 0x
  36. (hexadecimal) or
  37. .B 0
  38. (octal).
  39. The Unicode character can also be represented as
  40. .BI ' x
  41. where
  42. .I x
  43. gives the UTF-8 representation of the character
  44. (see
  45. .IR utf (6)).
  46. .SH "SEE ALSO"
  47. .IR cons (3),
  48. .IR keyboard (6),
  49. .IR utf (6)
  50. .SH FILES
  51. .B /sys/lib/kbmap/*
  52. .SH SOURCE
  53. .B /sys/src/9/port/devkbmap.c