crysterm
crysterm copied to clipboard
Clean up behavior of [_]listen_keys
Screen#listen_keys has two versions:
- It sets up general listening for keys and emitting key events
- 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.