There are events called 'onkeydown' and 'onkeyup' in Javascript. Can anyone please suggest the python equivalent of it?
There are events called 'onkeydown' and 'onkeyup' in Javascript. Can anyone please suggest the python equivalent of it?
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.