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

Typing 25 acts like if you've typed 2 #497

Open
ghost opened this issue Dec 21, 2020 · 3 comments
Open

Typing 25 acts like if you've typed 2 #497

ghost opened this issue Dec 21, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 21, 2020

Hi.

I have a gallery. Every photo in the gallery have unique numbers. If I type 25, I want to go to photo 25. But instead, it goes to photo 2.

Suggestion: wait for maybe 1 second (or less) for the function to take action.

@crystalfp
Copy link

Already works if in bind you put "2 5" ie with a space in between.

@ghost
Copy link
Author

ghost commented Dec 30, 2020

Thanks. That works. But if I have a shortcut that have 2 and also 2 0, only the last one will be registered. However, I can use 0 2 and that will work.

@crystalfp
Copy link

It is written in the documentation that you cannot have a single key also as start key of a sequence.
Unfortunately seems you have to develop your own input method. Something along the lines of: handler for keypress, start a timer, if another keypress happens before timer expires then append to input string.
In my opinion Mousetrap is not the right tool to solve your problem.
Good luck!
mario

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

1 participant