linebender / linebender/druid

Add .on_keyup method, similar to .on_click

Open
#787 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.