Ask coding questions

← Back to all posts
How do I detect keystrokes in Python?
CarterTimmons03

I am trying to detect when a key is pressed (space), but i cannot figure out how. I have researched it, but every answer does not work and gives me an error. I am using a mac, which may be part of the problem.

Voters
CarterTimmons03
Comments
hotnewtop
MrVoo

Use the getkey module