Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add escape_unfocuses field to PyCUI #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tadeaspaule
Copy link

@tadeaspaule tadeaspaule commented Sep 13, 2021

More control over Escape / focus behavior. For use cases like single-widget applications and those that never want to go out of focus mode

  • I have read the contribution guidelines
  • CI Unit tests pass
  • New functions/classes have consistent docstrings

What this pull request changes

  • add escape_unfocuses field to PyCUI objects, default True. If set to False, user can provide widget-specific behavior for when Esc is pressed.

Issues fixed with this pull request

@jwlodek
Copy link
Owner

jwlodek commented Dec 29, 2021

I've thought about this, and would it perhaps be better to have the unfocus key be settable? With KEY_ESCAPE just the default? We could even add the option to set it to None so that there is no default unfocus key

@tadeaspaule
Copy link
Author

tadeaspaule commented Dec 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants