-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat(component): Add a mean for components to access raw key events #81
base: main
Are you sure you want to change the base?
feat(component): Add a mean for components to access raw key events #81
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 from me, also do you mind sharing what are you building & why you needed this? 👀
Sure! I'm building a markdown tasks parser and manager. I wanted to add a search bar and therefore needed to get user input. 2024-09-29.22-49-02.mp4 |
that looks pretty! looking forward to the new releases, I want to package it for Arch 🐻 |
I defer to @kdheepak for whether this is the right idea. I'm not too familiar with this template. |
I think this is a good reference PR! Thanks for making it. I'm not sure if we should merge it though, because the component template is already more complex than I'd like for a template and severely under-documented. |
Your review was correct, I think this new version is cleaner. It allows a component to set specific actions to be escaped in editing mode.
I agree with you, I'm happy with the template and did not have to change it a lot beside this "can't access raw keys" issue. But it was not a "ready to jump in" template for me, especially for a first Ratatui app, it took me some time to get comfortable with it. |
Description
This adds an
is_editing
method to components for whether they should receive all key inputs or just the regular actions.Why
Currently, there is no way for a component to take user input.