Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Python 为 Linux 开发翻译软件。我正在寻找一种方法来获取按键事件。当按下英文字母键时,我希望将按下的键分配给变量。
我试过谷歌搜索和阅读各种文章,但到目前为止还没有任何运气。
使用Pygame,您关心Pygame.KEYDOWN 键盘事件。您可以在 pygame 示例Aliens.py中查看如何使用它。
Pygame.KEYDOWN