Lua 5.3 didn't need an x86 emulator. But now, it has one regardless.
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.

kbdmaps.lua 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. map_char_to_key = {}
  2. map_char_to_key[258] = 0x50 -- down
  3. map_char_to_key[260] = 0x4B -- left
  4. map_char_to_key[259] = 0x48 -- up
  5. map_char_to_key[261] = 0x4D -- right
  6. map_char_to_key[13] = 0x1C -- enter
  7. map_char_to_key[0] = 0
  8. map_char_to_key[0x1C] = 1 -- esc
  9. for i=1,9 do map_char_to_key[i + 48] = i + 1 end
  10. local chrs = "!@#$%^&*()"
  11. for i=1,#chrs do map_char_to_key[string.byte(chrs, i, i)] = i + 1 end
  12. map_char_to_key[48] = 11 -- numbers
  13. map_char_to_key[45] = 12 -- -
  14. map_char_to_key[95] = 12 -- _
  15. map_char_to_key[61] = 13 -- =
  16. map_char_to_key[43] = 12 -- +
  17. map_char_to_key[8] = 14 -- backspace
  18. map_char_to_key[9] = 15 -- tab
  19. local chrs = "qwertyuiop[]"
  20. for i=1,#chrs do map_char_to_key[string.byte(chrs,i,i)] = 15 + i end
  21. local chrs = "QWERTYUIOP{}"
  22. for i=1,#chrs do map_char_to_key[string.byte(chrs,i,i)] = 15 + i end
  23. map_char_to_key[13] = 28 -- enter
  24. -- 29?
  25. local chrs = "asdfghjkl;'"
  26. for i=1,#chrs do map_char_to_key[string.byte(chrs,i,i)] = 29 + i end
  27. local chrs = "ASDFGHJKL:\""
  28. for i=1,#chrs do map_char_to_key[string.byte(chrs,i,i)] = 29 + i end
  29. map_char_to_key[96] = 41 -- `
  30. map_char_to_key[126] = 41 -- ~
  31. -- 42?
  32. map_char_to_key[92] = 43 -- \
  33. map_char_to_key[124] = 43 -- |
  34. local chrs = "zxcvbnm,./"
  35. for i=1,#chrs do map_char_to_key[string.byte(chrs,i,i)] = 43 + i end
  36. local chrs = "ZXCVBNM<>?"
  37. for i=1,#chrs do map_char_to_key[string.byte(chrs,i,i)] = 43 + i end
  38. -- 54?
  39. map_char_to_key[42] = 55 -- *
  40. -- 56?
  41. map_char_to_key[32] = 57 -- space