question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove hard coded quit when Escape is pressed

See original GitHub issue

Is 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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kitaocommented, Nov 4, 2019

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.

0reactions
bnidevscommented, Aug 5, 2020

Looking at this, I assume it’s 0?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found