Skip to content
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

Support "sticky keys" #2

Open
gihrig opened this issue Jan 8, 2024 · 7 comments
Open

Support "sticky keys" #2

gihrig opened this issue Jan 8, 2024 · 7 comments
Assignees
Labels
feature New feature or request

Comments

@gihrig
Copy link

gihrig commented Jan 8, 2024

Sticky Keys is a feature in macOS that allows users with limited dexterity to use keyboard shortcuts in sequence instead of holding them down at the same time.

This works by implementing a delay after a key press in which the next key press is added in sequence to the delayed key.

For example, to copy highlighted text you normally press a multi-key sequence Ctrl-C.

This feature would allow the same operation by pressing and releasing Ctrl then pressing C within the delay period.

The delay period should be programmable and assignable. That is, applicable only to selected keys rather than to all keys vs none.

While this is considered an accessibility feature, my intended use case is to bring a hidden note taking app to the foreground by rapidly pressing a key twice (or more times) in succession.

@friendlymatthew
Copy link
Member

Thanks @gihrig!

This seems like a cool use case, and something that can be introduced as an optional feature.

Something like:

use_hotkeys(
    "ctrl+v",
    Callback::new(move |_| {
        set_count.update(|count| {
            *count += 1;
        });
    }),
   option::Sticky(
       30, // some time threshold
   )
);

So we'll listen for ctrl and v within the 30ms cooldown period.

Full transparency: I'm quite limited with time right now since I have to focus on work. If you want to give this a go, that would be super awesome

@gihrig
Copy link
Author

gihrig commented Jan 9, 2024

@friendlymatthew Similar situation with work ATM. When I get to the point where this is a blocking feature, I'll have time to devote. Not sure just when that will be though.

In the mean time it's been recorded for a future todo.

@friendlymatthew
Copy link
Member

In the mean time it's been recorded for a future todo.

Awesome. I'll tentatively assign this to you. No sweat and definitely no pressure.

Best of luck with work!

PS. Feel free to suggest more ideas, really appreciate your insight 🤠

@friendlymatthew friendlymatthew changed the title Support "stciky keys" Support "sticky keys" Jan 11, 2024
@friendlymatthew
Copy link
Member

Hey @gihrig any update to this? Just checking in 😄. All good if you're too busy!

@gihrig
Copy link
Author

gihrig commented Jan 31, 2024

@friendlymatthew Unfortunately the backlog continues to grow... ☹️
At this point the future of the app requiring this feature is in question, so I can't provide a time estimate as to when, or if, I'll get to this. Not entirely forgotten though.

@friendlymatthew
Copy link
Member

@gihrig No worries. Best of luck with your work!

@friendlymatthew
Copy link
Member

@gihrig -- Just wanted to let you know that I haven't forgotten this issue. After some investigation, it turns out this is a pretty important feature we're lacking. :)

Thanks for raising this issue

@mondeja mondeja removed this from the v0.2.0 milestone Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants