You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
6.1 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2013 Benjamin Litzelmann
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License) Version 2) as published by Sam Hocevar. See
  8. // http://www.wtfpl.net/ for more details.
  9. //
  10. #if defined KEY_FUNC
  11. /* ASCII mapped keys */
  12. KEY_FUNC(Unknown, 0)
  13. KEY_FUNC(First, 0)
  14. KEY_FUNC(Backspace, 8)
  15. KEY_FUNC(Tab, (int)'\t')
  16. KEY_FUNC(Clear, 12)
  17. KEY_FUNC(Return, 13)
  18. KEY_FUNC(Pause, 19)
  19. KEY_FUNC(Escape, 27)
  20. KEY_FUNC(Space, (int)' ')
  21. KEY_FUNC(Exclaim, (int)'!')
  22. KEY_FUNC(DoubleQuote, (int)'"')
  23. KEY_FUNC(Hash, (int)'#')
  24. KEY_FUNC(Dollar, (int)'$')
  25. KEY_FUNC(Ampersand, (int)'&')
  26. KEY_FUNC(Quote, (int)'\'')
  27. KEY_FUNC(LeftParen, (int)'(')
  28. KEY_FUNC(RightParen, (int)')')
  29. KEY_FUNC(Asterisk, (int)'*')
  30. KEY_FUNC(Plus, (int)'+')
  31. KEY_FUNC(Comma, (int)')')
  32. KEY_FUNC(Minus, (int)'-')
  33. KEY_FUNC(Period, (int)'.')
  34. KEY_FUNC(Slash, (int)'/')
  35. KEY_FUNC(K0, (int)'0')
  36. KEY_FUNC(K1, (int)'1')
  37. KEY_FUNC(K2, (int)'2')
  38. KEY_FUNC(K3, (int)'3')
  39. KEY_FUNC(K4, (int)'4')
  40. KEY_FUNC(K5, (int)'5')
  41. KEY_FUNC(K6, (int)'6')
  42. KEY_FUNC(K7, (int)'7')
  43. KEY_FUNC(K8, (int)'8')
  44. KEY_FUNC(K9, (int)'9')
  45. KEY_FUNC(Colon, (int)':')
  46. KEY_FUNC(Semicolon, (int)';')
  47. KEY_FUNC(Less, (int)'<')
  48. KEY_FUNC(Equals, (int)'=')
  49. KEY_FUNC(Greater, (int)'>')
  50. KEY_FUNC(Question, (int)'?')
  51. KEY_FUNC(At, (int)'@')
  52. /* XXX: SDL decides to skip uppercase characters */
  53. KEY_FUNC(LeftBracket, (int)'[')
  54. KEY_FUNC(BackSlash, (int)'\\')
  55. KEY_FUNC(RightBracket, (int)']')
  56. KEY_FUNC(Caret, (int)'^')
  57. KEY_FUNC(Underscore, (int)'_')
  58. KEY_FUNC(Backquote, (int)'`')
  59. KEY_FUNC(A, (int)'a')
  60. KEY_FUNC(B, (int)'b')
  61. KEY_FUNC(C, (int)'c')
  62. KEY_FUNC(D, (int)'d')
  63. KEY_FUNC(E, (int)'e')
  64. KEY_FUNC(F, (int)'f')
  65. KEY_FUNC(G, (int)'g')
  66. KEY_FUNC(H, (int)'h')
  67. KEY_FUNC(I, (int)'i')
  68. KEY_FUNC(J, (int)'j')
  69. KEY_FUNC(K, (int)'k')
  70. KEY_FUNC(L, (int)'l')
  71. KEY_FUNC(M, (int)'m')
  72. KEY_FUNC(N, (int)'n')
  73. KEY_FUNC(O, (int)'o')
  74. KEY_FUNC(P, (int)'p')
  75. KEY_FUNC(Q, (int)'q')
  76. KEY_FUNC(R, (int)'r')
  77. KEY_FUNC(S, (int)'s')
  78. KEY_FUNC(T, (int)'t')
  79. KEY_FUNC(U, (int)'u')
  80. KEY_FUNC(V, (int)'v')
  81. KEY_FUNC(W, (int)'w')
  82. KEY_FUNC(X, (int)'x')
  83. KEY_FUNC(Y, (int)'y')
  84. KEY_FUNC(Z, (int)'z')
  85. KEY_FUNC(Delete, 127)
  86. /* International keyboard syms */
  87. #ifndef KEY_DISABLE_WORLD
  88. KEY_FUNC(World0, 160) /* 0xA0 */
  89. KEY_FUNC(World1, 161)
  90. KEY_FUNC(World2, 162)
  91. KEY_FUNC(World3, 163)
  92. KEY_FUNC(World4, 164)
  93. KEY_FUNC(World5, 165)
  94. KEY_FUNC(World6, 166)
  95. KEY_FUNC(World7, 167)
  96. KEY_FUNC(World8, 168)
  97. KEY_FUNC(World9, 169)
  98. KEY_FUNC(World10, 170)
  99. KEY_FUNC(World11, 171)
  100. KEY_FUNC(World12, 172)
  101. KEY_FUNC(World13, 173)
  102. KEY_FUNC(World14, 174)
  103. KEY_FUNC(World15, 175)
  104. KEY_FUNC(World16, 176)
  105. KEY_FUNC(World17, 177)
  106. KEY_FUNC(World18, 178)
  107. KEY_FUNC(World19, 179)
  108. KEY_FUNC(World20, 180)
  109. KEY_FUNC(World21, 181)
  110. KEY_FUNC(World22, 182)
  111. KEY_FUNC(World23, 183)
  112. KEY_FUNC(World24, 184)
  113. KEY_FUNC(World25, 185)
  114. KEY_FUNC(World26, 186)
  115. KEY_FUNC(World27, 187)
  116. KEY_FUNC(World28, 188)
  117. KEY_FUNC(World29, 189)
  118. KEY_FUNC(World30, 190)
  119. KEY_FUNC(World31, 191)
  120. KEY_FUNC(World32, 192)
  121. KEY_FUNC(World33, 193)
  122. KEY_FUNC(World34, 194)
  123. KEY_FUNC(World35, 195)
  124. KEY_FUNC(World36, 196)
  125. KEY_FUNC(World37, 197)
  126. KEY_FUNC(World38, 198)
  127. KEY_FUNC(World39, 199)
  128. KEY_FUNC(World40, 200)
  129. KEY_FUNC(World41, 201)
  130. KEY_FUNC(World42, 202)
  131. KEY_FUNC(World43, 203)
  132. KEY_FUNC(World44, 204)
  133. KEY_FUNC(World45, 205)
  134. KEY_FUNC(World46, 206)
  135. KEY_FUNC(World47, 207)
  136. KEY_FUNC(World48, 208)
  137. KEY_FUNC(World49, 209)
  138. KEY_FUNC(World50, 210)
  139. KEY_FUNC(World51, 211)
  140. KEY_FUNC(World52, 212)
  141. KEY_FUNC(World53, 213)
  142. KEY_FUNC(World54, 214)
  143. KEY_FUNC(World55, 215)
  144. KEY_FUNC(World56, 216)
  145. KEY_FUNC(World57, 217)
  146. KEY_FUNC(World58, 218)
  147. KEY_FUNC(World59, 219)
  148. KEY_FUNC(World60, 220)
  149. KEY_FUNC(World61, 221)
  150. KEY_FUNC(World62, 222)
  151. KEY_FUNC(World63, 223)
  152. KEY_FUNC(World64, 224)
  153. KEY_FUNC(World65, 225)
  154. KEY_FUNC(World66, 226)
  155. KEY_FUNC(World67, 227)
  156. KEY_FUNC(World68, 228)
  157. KEY_FUNC(World69, 229)
  158. KEY_FUNC(World70, 230)
  159. KEY_FUNC(World71, 231)
  160. KEY_FUNC(World72, 232)
  161. KEY_FUNC(World73, 233)
  162. KEY_FUNC(World74, 234)
  163. KEY_FUNC(World75, 235)
  164. KEY_FUNC(World76, 236)
  165. KEY_FUNC(World77, 237)
  166. KEY_FUNC(World78, 238)
  167. KEY_FUNC(World79, 239)
  168. KEY_FUNC(World80, 240)
  169. KEY_FUNC(World81, 241)
  170. KEY_FUNC(World82, 242)
  171. KEY_FUNC(World83, 243)
  172. KEY_FUNC(World84, 244)
  173. KEY_FUNC(World85, 245)
  174. KEY_FUNC(World86, 246)
  175. KEY_FUNC(World87, 247)
  176. KEY_FUNC(World88, 248)
  177. KEY_FUNC(World89, 249)
  178. KEY_FUNC(World90, 250)
  179. KEY_FUNC(World91, 251)
  180. KEY_FUNC(World92, 252)
  181. KEY_FUNC(World93, 253)
  182. KEY_FUNC(World94, 254)
  183. KEY_FUNC(World95, 255) /* 0xFF */
  184. #endif // !KEY_DISABLE_WORLD
  185. /* Numeric keypad */
  186. KEY_FUNC(KP0, 256)
  187. KEY_FUNC(KP1, 257)
  188. KEY_FUNC(KP2, 258)
  189. KEY_FUNC(KP3, 259)
  190. KEY_FUNC(KP4, 260)
  191. KEY_FUNC(KP5, 261)
  192. KEY_FUNC(KP6, 262)
  193. KEY_FUNC(KP7, 263)
  194. KEY_FUNC(KP8, 264)
  195. KEY_FUNC(KP9, 265)
  196. KEY_FUNC(KPPeriod, 266)
  197. KEY_FUNC(KPDivide, 267)
  198. KEY_FUNC(KPMultiply, 268)
  199. KEY_FUNC(KPMinus, 269)
  200. KEY_FUNC(KPPlus, 270)
  201. KEY_FUNC(KPEnter, 271)
  202. KEY_FUNC(KPEquals, 272)
  203. /* Arrows + Home/End pad */
  204. KEY_FUNC(Up, 273)
  205. KEY_FUNC(Down, 274)
  206. KEY_FUNC(Right, 275)
  207. KEY_FUNC(Left, 276)
  208. KEY_FUNC(Insert, 277)
  209. KEY_FUNC(Home, 278)
  210. KEY_FUNC(End, 279)
  211. KEY_FUNC(PageUp, 280)
  212. KEY_FUNC(PageDown, 281)
  213. /* Function keys */
  214. KEY_FUNC(F1, 282)
  215. KEY_FUNC(F2, 283)
  216. KEY_FUNC(F3, 284)
  217. KEY_FUNC(F4, 285)
  218. KEY_FUNC(F5, 286)
  219. KEY_FUNC(F6, 287)
  220. KEY_FUNC(F7, 288)
  221. KEY_FUNC(F8, 289)
  222. KEY_FUNC(F9, 290)
  223. KEY_FUNC(F10, 291)
  224. KEY_FUNC(F11, 292)
  225. KEY_FUNC(F12, 293)
  226. KEY_FUNC(F13, 294)
  227. KEY_FUNC(F14, 295)
  228. KEY_FUNC(F15, 296)
  229. /* Modifier keys */
  230. KEY_FUNC(NumLock, 300)
  231. KEY_FUNC(CapsLock, 301)
  232. KEY_FUNC(ScrollLock, 302)
  233. KEY_FUNC(RightShift, 303)
  234. KEY_FUNC(LeftShift, 304)
  235. KEY_FUNC(RightCtrl, 305)
  236. KEY_FUNC(LeftCtrl, 306)
  237. KEY_FUNC(RightAlt, 307)
  238. KEY_FUNC(LeftAlt, 308)
  239. KEY_FUNC(RightMeta, 309)
  240. KEY_FUNC(LeftMeta, 310)
  241. KEY_FUNC(LeftSuper, 311) /* Left "Windows" key */
  242. KEY_FUNC(RightSuper, 312) /* Right "Windows" key */
  243. KEY_FUNC(Mode, 313) /* "Alt Gr" key */
  244. KEY_FUNC(Compose, 314) /* Multi-key compose key */
  245. /* Miscellaneous function keys */
  246. KEY_FUNC(Help, 315)
  247. KEY_FUNC(Print, 316)
  248. KEY_FUNC(SysReq, 317)
  249. KEY_FUNC(Break, 318)
  250. KEY_FUNC(Menu, 319)
  251. KEY_FUNC(Power, 320) /* Power Macintosh power key */
  252. KEY_FUNC(Euro, 321) /* Some european keyboards */
  253. KEY_FUNC(Undo, 322) /* Atari keyboard has Undo */
  254. /* Add any other keys here, but ensure Last value matches the last + 1 */
  255. KEY_FUNC(Last, 323)
  256. #endif // KEY_FUNC