mousetrap icon indicating copy to clipboard operation
mousetrap copied to clipboard

Typing 25 acts like if you've typed 2

Open ghost opened this issue 3 years ago • 3 comments

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.

ghost avatar Dec 21 '20 23:12 ghost

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

crystalfp avatar Dec 30 '20 10:12 crystalfp

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.

ghost avatar Dec 30 '20 11:12 ghost

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

crystalfp avatar Dec 30 '20 19:12 crystalfp