Without any external library, python can't provide GUI features, such as events handling. Listening to an event such onkeydown
or onkeyup
is thus impossible with the python sdl.
If you really want to react to these events, you must use an external library providing event-driven operations, such as the Qt binding PyQt, the TKinter module, or other libraries.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…