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

Using same key in combinations as sequence does not always work #512

Closed
bjrmatos opened this issue Mar 13, 2024 · 13 comments
Closed

Using same key in combinations as sequence does not always work #512

bjrmatos opened this issue Mar 13, 2024 · 13 comments

Comments

@bjrmatos
Copy link
Sponsor

example case:

i create an alias for ⇧⌘A (this keyboard shortcut trigger a Search Tabs window) in Chrome for it to be a sequence "⌥F ⌥F"

Screenshot 2024-03-13 at 2  14 06@2x

however i've noticed that it does not work in specific cases:

  • if you hold "⌥F", keep pressing ⌥ but release F, and hold F again, it does not make it trigger. this seems to be an issue when using the same key F in the sequence, because for other combinations that don't use same key it works, like "⌥D ⌥F" (holding "⌥D", keep pressing ⌥ but releasing D, then pressing F). what only makes it trigger in this case is hold "⌥F", release both "⌥" and "F" then hold "⌥F", basically if you want to keep you finger in the "⌥" then it won't work when using the same key "F" in the sequence

  • if i change the keyboard shortcut to be now "⌥F F", this makes it even worse, now it does not trigger most of the time, and it is a matter of some luck to get it activated, again if i use a sequence with different key like "⌥D F", it is not an issue.

a general video showing the case: https://share.cleanshot.com/9rfXyZ8H

@zenangst
Copy link
Owner

Interesting observation, I'll take a deep-dive into how we resolve sequences with duplicate keys. Might be a small 🐛 in there somewhere.

I'll do some digging and get back to you.

@zenangst
Copy link
Owner

@bjrmatos I recreated your setup and can reproduce the issue.
I'll keep you posted on the progress.

@zenangst
Copy link
Owner

@bjrmatos Good news, I think I figure out what is going on and have a fix for the upcoming version.

@zenangst
Copy link
Owner

@bjrmatos would you mind taking 3.23.1 for a spin to verify if this is fixed now?
https://github.com/zenangst/KeyboardCowboy/releases/tag/3.23.1

@bjrmatos
Copy link
Sponsor Author

it is working now, thanks, this is a great improvement for me, I've tried everything to have keyboard chords (like the ones in vscode) working on macOS level, Keyboard Cowboy is the one that does it the best.

@bjrmatos
Copy link
Sponsor Author

i have a question, if i have "⌥F ⌥F" sequence setup, but only press the first "⌥F", if i don't press any other key, is there a timeout in which i can press the second "⌥F"? during my test i think i get like 7-8s but wanted to confirm. related to this, do you think it is a good idea to show some kind of indicator (as an option) that the sequence has started?

i mean, for example in vscode if you press the first part of a chord/sequence you get this in status bar:

Screenshot 2024-03-15 at 12  03 04@2x

in Cowboy case maybe what works best is some kind of little float message with just the keys pressed, but just wanted to share the idea, just in case you find it useful.

@zenangst
Copy link
Owner

@bjrmatos Right now we don't have a timeout, but if you activate a bundle/sequence, you can always tap on the Escape keep to get out of it.

You can enable bundle notifications in the application settings.

image

@bjrmatos
Copy link
Sponsor Author

Right now we don't have a timeout, but if you activate a bundle/sequence, you can always tap on the Escape keep to get out of it.

great, thanks, that should be enough for me.

You can enable bundle notifications in the application settings.

interesting, i will give it a try, though not a big fan of seeing an empty circle when not having something to show, but let's see i will experiment with it

Screenshot 2024-03-15 at 1  44 42@2x

@zenangst
Copy link
Owner

We can add a feature to hide it entirely when it is empty.
I'll add it to the backlog 😎

@bjrmatos
Copy link
Sponsor Author

We can add a feature to hide it entirely when it is empty.
I'll add it to the backlog 😎

sounds great!!

sorry to spam the github issue, but since we are already talking about the notification, something i want to mention:

https://share.cleanshot.com/ryPGwcnd

in the video i am activating the "testing" user mode with "⌥K ⌥U", however since i have other keyboard sequences with the "Show bundles" notification enabled, the "testing" user mode notification gets hidden, likely just need a bit of reorder so the notifications get stacked or something like that

@zenangst
Copy link
Owner

No worries @bjrmatos, I’ll look into it. Don’t be shy to bring this to my attention, the outcome is that we get a better product ❤️

@zenangst
Copy link
Owner

zenangst commented Mar 16, 2024

@bjrmatos did a bit of work on this issue now, the tiny dot won't show up in the upcoming version 😎
I'm also looking into properly reseting and hiding the bundle view if any other keystrokes are invoked (or the match is hit).

@bjrmatos
Copy link
Sponsor Author

awesome, thanks for the quick fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants