This PR adds a new sdl2.ext module with a series of functions that allow Pythonic handling of SDL input events without needing to deal directly with SDL_Event loops, as well as an additional function in sdl2.ext.common for specifically handling quit requests. The current PR contains functions for handling keypress, mouse click, and text input events, but joystick/controller events will hopefully be added in a future update.
In general, these new functions should make it faster and easier for SDL2 beginners (and veterans) to write clean, readable input processing loops while also allowing a great deal of flexibility.
Merge Checklist
[ ] the PR has been reviewed and all comments are resolved
PR Description
This PR adds a new
sdl2.ext
module with a series of functions that allow Pythonic handling of SDL input events without needing to deal directly withSDL_Event
loops, as well as an additional function insdl2.ext.common
for specifically handling quit requests. The current PR contains functions for handling keypress, mouse click, and text input events, but joystick/controller events will hopefully be added in a future update.In general, these new functions should make it faster and easier for SDL2 beginners (and veterans) to write clean, readable input processing loops while also allowing a great deal of flexibility.
Merge Checklist
closes #<issue-number>
to automatically close an issue