mathieudutour / scroll-through-time

:hourglass: :tophat: :rabbit2: Two fingers scroll moves through time instead of space
https://xkcd.com/1806/
MIT License
721 stars 54 forks source link

Too strict definition of 'horizontal' for touchpads. #8

Open whiskytroll opened 6 years ago

whiskytroll commented 6 years ago

When using a touchpad, the scrolling action is rarely - if ever - absolutely horizontal or vertical, but almost always somewhat slanted. This means that when the intention is to scroll vertically, the scrolling action will also be somewhat (if ever so slightly) horizontal and therefore simultaneously scroll in time. Obviously this is somewhat annoying and also makes it difficult to use the correct version (at least whenever the correct one isn't the last one).

Perhaps it would be better if scroll-through-time compared the horizontal component to the vertical component and only applied its time machine magic if the horizontal component where larger than the vertical. Or perhaps it should be a user setting (although I can't imagine why one would intentionally scroll in both time and space simultaneously, I would have to admit that some (many?) have habits I don't fully understand so it's supposedly possible), perhaps then including at which threshold it should start to interact. My vote is for not having a user setting though: K.I.S.S.

Atom : 1.17.2 Electron: 1.3.15 Chrome : 52.0.2743.82 Node : 6.5.0

Kernel: 4.4.0-79-generic x86_64 (64 bit gcc: 5.4.0) Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.1 Serena

mathieudutour commented 6 years ago

Hum pretty sure that already what I’m doing. Maybe you can tweak the values to see what would be more fit for you

whiskytroll commented 6 years ago

Ok, thats weird. I'll try to see what I'm doing wrong. Thanks for a quick reply!

whiskytroll commented 6 years ago

I can't seem to find the reason for my problem. I don't know how to proceed either.

I have looked at your code to see if I can tweak the values as you suggested, but it does seem to do exactly as you were 'pretty sure' it would - if horizontal is lesser than vertical it doesn't undo/redo. I certainly doesn't scroll more sideways than up-and-down when I try to scroll up-and-down, so your method should be more than enough. The other settings with how far it must scroll for a single undo/redo step isn't really a problem here (although it's good to know I can easily change them should I need/wish to).

Do you have any other suggestions for me? This is a bit out of my league as I'm a novice at best. Could it be something with my touchpad settings?