keycodes.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. //
  19. #ifndef __KEYCODES_H__
  20. #define __KEYCODES_H__
  21. //
  22. // these are the key numbers that should be passed to KeyEvent
  23. //
  24. // normal keys should be passed as lowercased ascii
  25. typedef enum {
  26. K_TAB = 9,
  27. K_ENTER = 13,
  28. K_ESCAPE = 27,
  29. K_SPACE = 32,
  30. K_BACKSPACE = 127,
  31. K_COMMAND = 128,
  32. K_CAPSLOCK,
  33. K_POWER,
  34. K_PAUSE,
  35. K_UPARROW,
  36. K_DOWNARROW,
  37. K_LEFTARROW,
  38. K_RIGHTARROW,
  39. K_ALT,
  40. K_CTRL,
  41. K_SHIFT,
  42. K_INS,
  43. K_DEL,
  44. K_PGDN,
  45. K_PGUP,
  46. K_HOME,
  47. K_END,
  48. K_F1,
  49. K_F2,
  50. K_F3,
  51. K_F4,
  52. K_F5,
  53. K_F6,
  54. K_F7,
  55. K_F8,
  56. K_F9,
  57. K_F10,
  58. K_F11,
  59. K_F12,
  60. K_F13,
  61. K_F14,
  62. K_F15,
  63. K_KP_HOME,
  64. K_KP_UPARROW,
  65. K_KP_PGUP,
  66. K_KP_LEFTARROW,
  67. K_KP_5,
  68. K_KP_RIGHTARROW,
  69. K_KP_END,
  70. K_KP_DOWNARROW,
  71. K_KP_PGDN,
  72. K_KP_ENTER,
  73. K_KP_INS,
  74. K_KP_DEL,
  75. K_KP_SLASH,
  76. K_KP_MINUS,
  77. K_KP_PLUS,
  78. K_KP_NUMLOCK,
  79. K_KP_STAR,
  80. K_KP_EQUALS,
  81. K_MOUSE1,
  82. K_MOUSE2,
  83. K_MOUSE3,
  84. K_MOUSE4,
  85. K_MOUSE5,
  86. K_MWHEELDOWN,
  87. K_MWHEELUP,
  88. K_JOY1,
  89. K_JOY2,
  90. K_JOY3,
  91. K_JOY4,
  92. K_JOY5,
  93. K_JOY6,
  94. K_JOY7,
  95. K_JOY8,
  96. K_JOY9,
  97. K_JOY10,
  98. K_JOY11,
  99. K_JOY12,
  100. K_JOY13,
  101. K_JOY14,
  102. K_JOY15,
  103. K_JOY16,
  104. K_JOY17,
  105. K_JOY18,
  106. K_JOY19,
  107. K_JOY20,
  108. K_JOY21,
  109. K_JOY22,
  110. K_JOY23,
  111. K_JOY24,
  112. K_JOY25,
  113. K_JOY26,
  114. K_JOY27,
  115. K_JOY28,
  116. K_JOY29,
  117. K_JOY30,
  118. K_JOY31,
  119. K_JOY32,
  120. K_AUX1,
  121. K_AUX2,
  122. K_AUX3,
  123. K_AUX4,
  124. K_AUX5,
  125. K_AUX6,
  126. K_AUX7,
  127. K_AUX8,
  128. K_AUX9,
  129. K_AUX10,
  130. K_AUX11,
  131. K_AUX12,
  132. K_AUX13,
  133. K_AUX14,
  134. K_AUX15,
  135. K_AUX16,
  136. K_LAST_KEY // this had better be <256!
  137. } keyNum_t;
  138. // The menu code needs to get both key and char events, but
  139. // to avoid duplicating the paths, the char events are just
  140. // distinguished by or'ing in K_CHAR_FLAG (ugly)
  141. #define K_CHAR_FLAG 1024
  142. #endif