for event in pygame.event.get():
if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP:
print (event)
When I pressed arrow up this was the output:
<Event(2-KeyDown {'unicode': '', 'key': 273, 'mod': 0, 'scancode': 111})>
What is the syntax to access the dict? I want just to print the key key
value from this dict. Any ideas?