Advertisement
Leka74

Virtual Key Codes in a table

Apr 10th, 2011
15,260
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Key = {};
  2.  
  3. Key["backspace"] = 8;
  4. Key["tab"] = 9;
  5. Key["enter"] = 13;
  6. Key["shift"] = 16;
  7. Key["ctrl"] = 17;
  8. Key["alt"] = 18;
  9. Key["pause"] = 19;
  10. Key["caps lock"] = 20
  11. Key["esc"] = 27;
  12. Key["spacebar"] = 32;
  13. Key["page up"] = 33;
  14. Key["page down"] = 34;
  15. Key["end"] = 35;
  16. Key["home"] = 36;
  17. Key["left arrow"] = 37;
  18. Key["up arrow"] = 38;
  19. Key["right arrow"] = 39;
  20. Key["down arrow"] = 40;
  21. Key["insert"] = 45;
  22. Key["delete"] = 46;
  23. Key["0"] = 48;
  24. Key["1"] = 49;
  25. Key["2"] = 50;
  26. Key["3"] = 51;
  27. Key["4"] = 52;
  28. Key["5"] = 53;
  29. Key["6"] = 54;
  30. Key["7"] = 55;
  31. Key["8"] = 56;
  32. Key["9"] = 57;
  33. Key["a"] = 65;
  34. Key["b"] = 66;
  35. Key["c"] = 67;
  36. Key["d"] = 68;
  37. Key["e"] = 69;
  38. Key["f"] = 70;
  39. Key["g"] = 71;
  40. Key["h"] = 72;
  41. Key["i"] = 73;
  42. Key["j"] = 74;
  43. Key["k"] = 75;
  44. Key["l"] = 76;
  45. Key["m"] = 77;
  46. Key["n"] = 78;
  47. Key["o"] = 79;
  48. Key["p"] = 80;
  49. Key["q"] = 81;
  50. Key["r"] = 82;
  51. Key["s"] = 83;
  52. Key["t"] = 84;
  53. Key["u"] = 85;
  54. Key["v"] = 86;
  55. Key["w"] = 87;
  56. Key["x"] = 88;
  57. Key["y"] = 89;
  58. Key["z"] = 90;
  59. Key["lwindows"] = 91; -- Left Windows Key
  60. Key["rwindows"] = 92; -- Right Windows Key
  61. Key["appkey"] = 93; -- Application key - located between the right Windows and Ctrl keys on most keyboards
  62. -- Numpad numbers start
  63. Key["1n"] = 97;
  64. Key["2n"] = 98;
  65. Key["3n"] = 99;
  66. Key["4n"] = 100;
  67. Key["5n"] = 101;
  68. Key["6n"] = 102;
  69. Key["7n"] = 103;
  70. Key["8n"] = 104;
  71. Key["9n"] = 105;
  72. Key["*n"] = 106;
  73. Key["+n"] = 107;
  74. Key["-n"] = 109;
  75. Key[".n"] = 110;
  76. Key["/n"] = 111;
  77. -- Numpad numbers end
  78. Key["f1"] = 112;
  79. Key["f2"] = 113;
  80. Key["f3"] = 114;
  81. Key["f4"] = 115;
  82. Key["f5"] = 116;
  83. Key["f6"] = 117;
  84. Key["f7"] = 118;
  85. Key["f8"] = 119;
  86. Key["f9"] = 120;
  87. Key["f10"] = 121;
  88. Key["f11"] = 122;
  89. Key["f12"] = 123;
  90. Key["numlock"] = 144;
  91. Key["scrolllock"] = 145;
  92. Key[";"] = 186;
  93. Key["="] = 187;
  94. Key[","] = 188;
  95. Key["-"] = 189;
  96. Key["."] = 190;
  97. Key["/"] = 191;
  98. Key["`"] = 192;
  99. Key["["] = 219;
  100. Key["\\"] = 220;
  101. Key["]" ] = 221;
  102. Key["'"] = 221;
Advertisement
RAW Paste Data Copied
Advertisement