Remove hard coded quit when Escape is pressed
See original GitHub issueIs your feature request related to a problem? Please describe. I hope you will consider this small change - to remove hard coded quit when Escape is pressed - for the following reasons:
- Usually users expects Escape to toggle a menu. I’m currently working on some UI, but unfortunately using Escape is not an option right now.
- Game state (player stats, current level etc.) might get lost, because it’s not possible to save before quitting.
Describe the solution you’d like
Remove hard coded quit completely and let developers use pyxel.quit()
.
Describe alternatives you’ve considered
- Allow overriding the default behavior.
- An option to disable the default behavior.
Thank you! 😃
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to disable "Esc quit" when using Qt backend?
By default pressing Esc key will close the window (Qt backend), which is very convenient. But sometimes it is needed to disable this...
Read more >How to disable Esc key in PIE mode? - Unreal Engine Forums
At the top left of the screen, select the 'Edit' menu >> 'Editor Preferences' >> 'Keyboard shortcuts' tab on the left >> Under...
Read more >[core] Don't quit on escape key press · Issue #520 - GitHub
Currently the Escape key is being eaten by raylib's keyboard input ... and always (hardcoded) quit's the main loop when the key was...
Read more >Map ESC to keyboard-escape-quit - Emacs Stack Exchange
Most shortcuts I can change without a problem, but ESC seems to be more difficult. I don't wont to press ESC 3 times...
Read more >Don't exit full screen when pressing escape in apps like Safari ...
On the Triggers tab, select the Hot Key input field and press Escape . Ignore the warning that basically states you're insane. Remember...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Originally I thought I’ll add the global module variable, but your idea seems more better. So I’ll add new option for the
init
function as you described.Looking at this, I assume it’s 0?