Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

keys.h 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef _GPXE_KEYS_H
  2. #define _GPXE_KEYS_H
  3. /** @file
  4. *
  5. * Key definitions
  6. *
  7. */
  8. /*
  9. * Symbolic names for some standard ASCII characters
  10. *
  11. */
  12. #define NUL 0x00
  13. #define CTRL_A 0x01
  14. #define CTRL_B 0x02
  15. #define CTRL_C 0x03
  16. #define CTRL_D 0x04
  17. #define CTRL_E 0x05
  18. #define CTRL_F 0x06
  19. #define CTRL_G 0x07
  20. #define CTRL_H 0x08
  21. #define CTRL_I 0x09
  22. #define CTRL_J 0x0a
  23. #define CTRL_K 0x0b
  24. #define CTRL_L 0x0c
  25. #define CTRL_M 0x0d
  26. #define CTRL_N 0x0e
  27. #define CTRL_O 0x0f
  28. #define CTRL_P 0x10
  29. #define CTRL_Q 0x11
  30. #define CTRL_R 0x12
  31. #define CTRL_S 0x13
  32. #define CTRL_T 0x14
  33. #define CTRL_U 0x15
  34. #define CTRL_V 0x16
  35. #define CTRL_W 0x17
  36. #define CTRL_X 0x18
  37. #define CTRL_Y 0x19
  38. #define CTRL_Z 0x1a
  39. #define BACKSPACE CTRL_H
  40. #define TAB CTRL_I
  41. #define LF CTRL_J
  42. #define CR CTRL_M
  43. #define ESC 0x1b
  44. /*
  45. * Special keys outside the normal ASCII range
  46. *
  47. *
  48. * The names are chosen to match those used by curses. The values are
  49. * chosen to facilitate easy conversion from a received ANSI escape
  50. * sequence to a KEY_XXX constant. The KEY_XXX constant is simply
  51. * 0x100 plus the first byte following CSI in the ANSI escape
  52. * sequence. For example, KEY_LEFT is 0x144, since a left cursor key
  53. * is transmitted as the ANSI sequence "^[[D".
  54. */
  55. #define KEY_ANSI( character ) ( 0x100 + (character) )
  56. #define KEY_MIN 0x101
  57. #define KEY_UP KEY_ANSI ( 'A' ) /**< Up arrow */
  58. #define KEY_DOWN KEY_ANSI ( 'B' ) /**< Down arrow */
  59. #define KEY_RIGHT KEY_ANSI ( 'C' ) /**< Right arrow */
  60. #define KEY_LEFT KEY_ANSI ( 'D' ) /**< Left arrow */
  61. #define KEY_END KEY_ANSI ( 'F' ) /**< End */
  62. #define KEY_HOME KEY_ANSI ( 'H' ) /**< Home */
  63. #define KEY_IC KEY_ANSI ( '2' ) /**< Insert */
  64. #define KEY_DC KEY_ANSI ( '3' ) /**< Delete */
  65. #define KEY_PPAGE KEY_ANSI ( '5' ) /**< Page up */
  66. #define KEY_NPAGE KEY_ANSI ( '6' ) /**< Page down */
  67. #define KEY_MAX 0x1ff
  68. /* Not in the [KEY_MIN,KEY_MAX] range; terminals seem to send these as
  69. * normal ASCII values.
  70. */
  71. #define KEY_BACKSPACE BACKSPACE
  72. #define KEY_ENTER LF
  73. #endif /* _GPXE_KEYS_H */