USBSCANCODES.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Contains two tables for USB keybaord scan codes
  3. * Each table is 256 words long to account for all possible scan code
  4. * One for shifted and one for non-shifted
  5. */
  6. /* vritual codes:
  7. - left 256
  8. - right 257
  9. - up 258
  10. - down 259
  11. - insert 260
  12. - home 261
  13. - pageup 262
  14. - end 263
  15. - pagedown 264
  16. */
  17. void DATA_USBSCANCODE_NORMAL(){
  18. asm(
  19. ".dw 0 0 0 0 97 98 99 100 101 102 103 104 105 106 107 108\n"
  20. ".dw 109 110 111 112 113 114 115 116 117 118 119 120 121 122 49 50\n"
  21. ".dw 51 52 53 54 55 56 57 48 10 27 8 9 32 45 61 91\n"
  22. ".dw 93 92 92 59 39 96 44 46 47 0 0 0 0 0 0 0\n"
  23. ".dw 0 0 0 0 0 0 0 0 0 260 261 262 127 263 264 257\n"
  24. ".dw 256 259 258 0 47 42 45 43 10 49 50 51 52 53 54 55\n"
  25. ".dw 56 57 48 46 92 0 0 0 0 0 0 0 0 0 0 0\n"
  26. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  27. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  28. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  29. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  30. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  31. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  32. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  33. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  34. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  35. );
  36. }
  37. void DATA_USBSCANCODE_SHIFTED(){
  38. asm(
  39. ".dw 0 0 0 0 65 66 67 68 69 70 71 72 73 74 75 76\n"
  40. ".dw 77 78 79 80 81 82 83 84 85 86 87 88 89 90 33 64\n"
  41. ".dw 35 36 37 94 38 42 40 41 10 27 8 9 32 95 43 123\n"
  42. ".dw 125 124 124 58 34 126 60 62 63 0 0 0 0 0 0 0\n"
  43. ".dw 0 0 0 0 0 0 0 0 0 260 261 262 127 263 264 257\n"
  44. ".dw 256 259 258 0 47 42 45 43 10 49 50 51 52 53 54 55\n"
  45. ".dw 56 57 48 46 124 0 0 0 0 0 0 0 0 0 0 0\n"
  46. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  47. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  48. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  49. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  50. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  51. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  52. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  53. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  54. ".dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"
  55. );
  56. }