Reputation: 326
I'm developing translation software for Linux using Python. I'm looking for a way to get the key pressed event. When an english letter key is pressed, I wan the pressed key to be assigned to a variable.
I've tried googling and reading various articles, but haven't had any luck so far.
Upvotes: 3
Views: 3278
Reputation: 12554
Using Pygame, you care about the Pygame.KEYDOWN
keyboard event. You can see how to use it in the pygame example aliens.py.
Upvotes: 2