Search code examples
pythontypescounterkeypress

Is it possible to make Key Counter in Python?


I want to make a key counter in Python. For example: If I click "a" it will print "1", if I clicked next key it will print "2" ...

Can I make it in pygame?


Solution

  • In pygame you can make a loop that gets the keypress event, and then according to the character associated with the event you can print it. Read the pygame docs.