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

Clean up behavior of [_]listen_keys #20

Open
docelic opened this issue Apr 8, 2023 · 0 comments
Open

Clean up behavior of [_]listen_keys #20

docelic opened this issue Apr 8, 2023 · 0 comments

Comments

@docelic
Copy link
Collaborator

docelic commented Apr 8, 2023

Screen#listen_keys has two versions:

  1. It sets up general listening for keys and emitting key events
  2. It allows widgets to register themselves as wanting to receive keyboard input

The functionality should be split into two separate parts.

  • One is setting up general key listener
  • And the other is registering widgets to receive keys

Also, widgets should not have to call listen_keys themselves, but if some appropriate instance variable is set to true, then the default widget initialize function should activate listening for keys.

Also, see if widgets have a disabled state, and if yes, while in this state they should not react to keys.

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

No branches or pull requests

1 participant