You are on page 1of 1

pygame.key.

get_pressed() - will get a list of booleans that


describes the state of each keyboard key. The value of the key
constant (such as pygame.K_TAB) can be used as the index into
this giant list.
Therefore pygame.key.get_pressed()[pygame.K_TAB] is an
expression that is true when the tab key is pressed.

You might also like