January 15, 2021, 05:32:30 PM

Author Topic: [bb] Scancode constants by WendellM [ 1+ years ago ]  (Read 673 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Scancode constants by WendellM [ 1+ years ago ]
« on: June 29, 2017, 12:28:40 AM »
Title : Scancode constants
Author : WendellM
Posted : 1+ years ago

Description : I'm posting this at the request of Outcast who created it.  He writes: "Maybe there was something already like this, or it was just so trivial that no one cared, but I got tired of seeing magic numbers and having to look up magic numbers whenever I wanted to read a key with blitz. So, I took the scan codes and created constants for each of them. All you need to do is copy the below text into a scancodes.bb file and you will be set to use the scan codes without ever having to memorize magic numbers again!"

Code :
Code: BlitzBasic
  1. Const KEY_ESCAPE = 1
  2. Const KEY_1 = 2
  3. Const KEY_2 = 3
  4. Const KEY_3 = 4
  5. Const KEY_4 = 5
  6. Const KEY_5 = 6
  7. Const KEY_6 = 7
  8. Const KEY_7 = 8
  9. Const KEY_8 = 9
  10. Const KEY_9 = 10
  11. Const KEY_0 = 11
  12. Const KEY_MINUS = 12
  13. Const KEY_EQUALS = 13
  14. Const KEY_BACKSPACE = 14
  15. Const KEY_TAB = 15
  16. Const KEY_Q = 16
  17. Const KEY_W = 17
  18. Const KEY_E = 18
  19. Const KEY_R = 19
  20. Const KEY_T = 20
  21. Const KEY_Y = 21
  22. Const KEY_U = 22
  23. Const KEY_I = 23
  24. Const KEY_O = 24
  25. Const KEY_P = 25
  26. Const KEY_LEFT_BRACKET = 26
  27. Const KEY_RIGHT_BRACKET = 27
  28. Const KEY_RETURN = 28
  29. Const KEY_LEFT_CONTROL = 29
  30. Const KEY_A = 30
  31. Const KEY_S = 31
  32. Const KEY_D = 32
  33. Const KEY_F = 33
  34. Const KEY_G = 34
  35. Const KEY_H = 35
  36. Const KEY_J = 36
  37. Const KEY_K = 37
  38. Const KEY_L = 38
  39. Const KEY_SEMICOLON = 39
  40. Const KEY_APOSTROPHE = 40
  41. Const KEY_GRAVE = 41
  42. Const KEY_LEFT_SHIFT = 42
  43. Const KEY_BACKSLASH = 43
  44. Const KEY_Z = 44
  45. Const KEY_X = 45
  46. Const KEY_C = 46
  47. Const KEY_V = 47
  48. Const KEY_B = 48
  49. Const KEY_N = 49
  50. Const KEY_M = 50
  51. Const KEY_COMMA = 51
  52. Const KEY_PERIOD = 52
  53. Const KEY_SLASH = 53
  54. Const KEY_RIGHT_SHIFT = 54
  55. Const KEY_MULTIPLY = 55
  56. Const KEY_LEFT_ALT = 56
  57. Const KEY_SPACE = 57
  58. Const KEY_CAPITAL = 58
  59. Const KEY_F1 = 59
  60. Const KEY_F2 = 60
  61. Const KEY_F3 = 61
  62. Const KEY_F4 = 62
  63. Const KEY_F5 = 63
  64. Const KEY_F6 = 64
  65. Const KEY_F7 = 65
  66. Const KEY_F8 = 66
  67. Const KEY_F9 = 67
  68. Const KEY_F10 = 68
  69. Const KEY_NUMLOCK = 69
  70. Const KEY_SCROLLLOCK = 70
  71. Const KEY_NUMPAD7 = 71
  72. Const KEY_NUMPAD8 = 72
  73. Const KEY_NUMPAD9 = 73
  74. Const KEY_SUBTRACT = 74
  75. Const KEY_NUMPAD4 = 75
  76. Const KEY_NUMPAD5 = 76
  77. Const KEY_NUMPAD6 = 77
  78. Const KEY_ADD = 78
  79. Const KEY_NUMPAD1 = 79
  80. Const KEY_NUMPAD2 = 80
  81. Const KEY_NUMPAD3 = 81
  82. Const KEY_NUMPAD0 = 82
  83. Const KEY_DECIMAL = 83
  84. Const KEY_OEM_102 = 86
  85. Const KEY_F11 = 87
  86. Const KEY_F12 = 88
  87. Const KEY_F13 = 100
  88. Const KEY_F14 = 101
  89. Const KEY_F15 = 102
  90. Const KEY_KANA = 112
  91. Const KEY_ABNT_C1 = 115
  92. Const KEY_CONVERT = 121
  93. Const KEY_NOCONVERT = 123
  94. Const KEY_YEN = 125
  95. Const KEY_ABNT_C2 = 126
  96. Const KEY_NUMPAD_EQUALS = 141
  97. Const KEY_PREVTRACK = 144
  98. Const KEY_AT = 145
  99. Const KEY_COLON = 146
  100. Const KEY_UNDERLINE = 147
  101. Const KEY_KANJI = 148
  102. Const KEY_STOP = 149
  103. Const KEY_AX = 150
  104. Const KEY_UNLABELED = 151
  105. Const KEY_NEXTTRACK = 153
  106. Const KEY_ENTER = 156
  107. Const KEY_RIGHT_CONTROL = 157
  108. Const KEY_MUTE = 160
  109. Const KEY_CALCULATOR = 161
  110. Const KEY_PLAY_PAUSE = 162
  111. Const KEY_MEDIASTOP = 164
  112. Const KEY_VOLUME_DOWN = 174
  113. Const KEY_VOLUME_UP = 176
  114. Const KEY_WEB_HOME = 178
  115. Const KEY_NUMPAD_COMMA = 179
  116. Const KEY_DIVIDE = 181
  117. Const KEY_SYSREQ = 183
  118. Const KEY_RIGHT_ALT = 184
  119. Const KEY_PAUSE = 197
  120. Const KEY_HOME = 199
  121. Const KEY_UP = 200
  122. Const KEY_PAGEUP = 201
  123. Const KEY_LEFT = 203
  124. Const KEY_RIGHT = 205
  125. Const KEY_END = 207
  126. Const KEY_DOWN = 208
  127. Const KEY_NEXT = 209
  128. Const KEY_INSERT = 210
  129. Const KEY_DELETE = 211
  130. Const KEY_LEFTWINDOWS = 219
  131. Const KEY_RIGHTWINDOWS = 220
  132. Const KEY_APPS = 221
  133. Const KEY_POWER = 222
  134. Const KEY_SLEEP = 223
  135. Const KEY_WAKE = 227
  136. Const KEY_WEBSEARCH = 229
  137. Const KEY_WEBFAVORITES = 230
  138. Const KEY_WEBREFRESH = 231
  139. Const KEY_WEBSTOP = 232
  140. Const KEY_WEBFORWARD = 233
  141. Const KEY_WEBBACK = 234
  142. Const KEY_MYCOMPUTER = 235
  143. Const KEY_MAIL = 236
  144. Const KEY_MEDIASELECT = 237


Comments :


Agamer(Posted 1+ years ago)

 I did some thing like this I wish i had looked here first


Red(Posted 1+ years ago)

 Can you convert this in AZERTY keyboard ?


N(Posted 1+ years ago)

 Definitely something I'll be using...Must've been very testing for your fingers :)


puki(Posted 1+ years ago)

 There is an include file somewhere in the Samples folder that someone knocked up.


VP(Posted 1+ years ago)

 Ah, I already did a (slightly UK'fied) version here:<a href="codearcsaa96.html?code=1483" target="_blank">http://www.blitzbasic.com/codearcs/codearcs.php?code=1483[/url]


Perturbatio(Posted 1+ years ago)

 I did one too, do I get a prize?<a href="codearcsd50a.html?code=1174" target="_blank">http://www.blitzbasic.com/codearcs/codearcs.php?code=1174[/url]


VP(Posted 1+ years ago)

 Your prize is: An Xbox360*!*not really.


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal