-
Notifications
You must be signed in to change notification settings - Fork 713
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
FR: ability to pause KeyProcessor #1910
Comments
It seems that it has to execute after |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to implement typeahead in a full screen app.
For example: if the user types a key while a list is loading, the key shouldn't be processed until the list is loaded and the item is focused.
Currently this is what I do:
asyncio.get_running_loop().set_task_factory(asyncio.eager_task_factory)
app._default_bindings
to add an<any>
handler, which will catch all unhandled keys.app.key_processor.feed_multiple
.key_processor.process_keys
. However, you have to call it viaaynscio.get_running_loop().call_later(0.1, app.key_processor.process_keys)
or the app will freeze. I have no idea why.I also noticed that there is an
input.detach
function. However, it doesn't work in a key binding handler since keys typed are already sent tokey_processor.input_queue
.The text was updated successfully, but these errors were encountered: