Skip to content

add escape_unfocuses field to PyCUI#145

Open
tadeaspaule wants to merge 2 commits into
jwlodek:mainfrom
tadeaspaule:control-esc-unfocus
Open

add escape_unfocuses field to PyCUI#145
tadeaspaule wants to merge 2 commits into
jwlodek:mainfrom
tadeaspaule:control-esc-unfocus

Conversation

@tadeaspaule

@tadeaspaule tadeaspaule commented Sep 13, 2021

Copy link
Copy Markdown

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

jwlodek commented Dec 29, 2021

Copy link
Copy Markdown
Owner

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

tadeaspaule commented Dec 30, 2021 via email

Copy link
Copy Markdown
Author

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.

2 participants