Reduce navigation speed using arrow keys in viewer#2038
Reduce navigation speed using arrow keys in viewer#2038petebankhead merged 1 commit intoqupath:mainfrom
Conversation
This makes panning easier using the arrow keys by decreasing the effect of a single keypress - which previously could pan too far. Pressing and holding an arrow still makes it possible to gradually accelerate when wanting to move further (at least on macOS).
alanocallaghan
left a comment
There was a problem hiding this comment.
It's better, but on Linux at least the behaviour when holding is to go medium speed -> slow speed -> faster, and it's hard to stop things before the viewer shoots off into space.
Aside from my fixing this (presumably platform-specific) weirdness in a future release, we could expose an acceleration rate parameter in future also.
|
How odd... there is a 'Use navigation acceleration' checkbox, but not a way to adjust the speed. Bizarrely, I'm finding no movement if I set the 'Navigation speed %' below 10%... although it slowly starts to shift if I hold the key down long enough. Certainly not ideal, but I'll merge this in the interim until anyone wants to delve into it (or we write an entirely new viewer). Thanks! |
This makes panning easier using the arrow keys by decreasing the effect of a single keypress - which previously could pan too far.
I found the old behavior deeply annoying when trying to pan to a precise location, but it turns out it can already be adjusted with a couple of preferences. So this PR just changes one of them.
Pressing and holding an arrow still makes it possible to gradually accelerate when wanting to move further (at least on macOS) - although there's a preference for this too..
You don't need to build this PR to check it - in QuPath v0.6.0, just reduce the preference value from
100to10:The navigation code is horribly complicated and should probably be revisited, but to me this change is the simplest way to get more intuitive default behavior.