Add .on_keyup method, similar to .on_click
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
I want to do a search-as-you-type interaction. Currently I'm sending a Command with the query using a Button, so I'd like to change that to sending a Command every time a key is pressed. I also want to intercept keyboard "enter" events and use that to send a different command.
Would it be appropriate to implement this in a similar way as the `.on_click` method? I imagine there's also a way to do this with lenses but I'll admit I haven't fully explored that yet. That wouldn't help with intercepting enter, however.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the existing `.on_click` method and the keyboard event handling paths. The work is done when keyup events can dispatch a command for each key press and Enter can be intercepted to dispatch a different command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100