Advertisement
KodingKid

PYGame Keyboard Inputs

Apr 23rd, 2021
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.96 KB | None | 0 0
  1. import pygame
  2. from pygame.locals import *
  3. import sys
  4. K_BACKSPACE == #backspace
  5. K_TAB == #tab
  6. K_CLEAR == #clear
  7. K_RETURN == #enter
  8. K_ESCAPE == #escape
  9. K_SPACE == #spacebar
  10. K_PLUS == #plus
  11. K_MINUS == #minus
  12. K_PERIOD == #fullstop
  13. K_SLASH == #slash
  14. K_UP == #up arrowkey
  15. K_DOWN == #down arrowkey
  16. K_LEFT == #left arrowkey
  17. K_RIGHT == #right arrowkey
  18. K_0 == #0
  19. K_1 == #1
  20. K_2 == #2
  21. K_3 == #3
  22. K_4 == #4
  23. K_5 == #5
  24. K_6 == #6
  25. K_7 == #7
  26. K_8 == #8
  27. K_9 == #9
  28. K_a == #a
  29. K_b == #b
  30. K_c == #c
  31. K_y == #c
  32. K_z == #z
  33. K_DELETE == #delete
  34. K_KP0 == #0 (keypad)
  35. K_KP1 == #1 (keypad)
  36. K_KP2 == #2 (keypad)
  37. K_KP3 == #3 (keypad)
  38. K_KP4 == #4 (keypad)
  39. K_KP5 == #5 (keypad)
  40. K_KP6 == #6 (keypad)
  41. K_KP7 == #7 (keypad)
  42. K_KP8 == #8 (keypad)
  43. K_KP9 == #9 (keypad)
  44. K_F1 == #f1
  45. K_F2 == #f2
  46. K_F3 == #f3
  47. K_F14 == #f14
  48. K_F15 == #f15
  49. K_RSHIFT == #right shift
  50. K_LSHIFT == #left shift
  51. K_RCLTRL == #right control
  52. K_LCTRL == #left control
  53. K_RALT == #right alt
  54. K_LALT == #left alt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement