nige123 / jmp.nigelhamilton.com

jmp - search files and jump to matching lines in a text editor
Other
13 stars 4 forks source link

Scrolling issue when holding a key #9

Open ryn1x opened 5 years ago

ryn1x commented 5 years ago

When scrolling through the results by holding down a direction key for a little while and then letting go, the program keeps scrolling.

I would guess every captured button press is converted into an action, like highlighting the next result. When holding a direction key maybe there is a way to ignore input until the next item has been highlighted? Or a way to make the scroll rate match the key repeat rate?

nige123 commented 5 years ago

Yes - a delay could be added - what do you think is a good time to set?

ryn1x commented 5 years ago

20 ms?

I say this because the fastest key repeat setting you can select from the KDE GUI is 50.00 repeats/s. And the fastest it looks like you can set from the macOS GUI is 30ms. I doubt many people go out of their way to set this value faster than what is conveniently available, so this would have scrolling as fast as what people with the highest convenient setting are used to, and for those with their key repeat rate set slower it should still just match that right?

ryn1x commented 5 years ago

Or know that I am thinking about it... could you just make the "highlight the next item" animation instant? Then it would just inherently match the user's key repeat rate? I say this without knowing what is happening behind the scenes. Just some ideas to hopefully lead you in the right direction =)