Skip to content

key names

stevepaget edited this page Feb 16, 2016 · 1 revision

wghs uses key names to identify which keys are being pressed. While Pygame recognises many specific key codes, the naming of them is a little obscure at times. To simplify things, these are the keys which have been given simple names in Pygame. A future development will be to allow any key press to be detected.

  • space
  • esc
  • up (Cursor key)
  • down (Cursor key)
  • left (Cursor key)
  • right (Cursor key)
  • a - z
  • 0 - 9 (Keypad keys)
Note: Case is ignored.
Clone this wiki locally