mpiannucci / gnome-shell-extended-gestures

Better touchpad gesture handling for GNOME
GNU General Public License v3.0
300 stars 34 forks source link

Add "Flick" Gestures #96

Open leiflm opened 3 years ago

leiflm commented 3 years ago

It would be really nice, if one could enable a timing dependency for a gesture like: "unless this gesture happens within 500ms, the event is ignored by the extension/propagated.".

This would allow two-finger gestures to be used alongside two-finger scrolling, etc.

I'm willing to implement this, but would be interested, if this has already been contemplated and was rejected for some reason?

mpiannucci commented 3 years ago

Hi, there is already a setting like this I think. If you adjust the sensitivity, that will change the threshold of the gesture to be detected.

Let me know if that is not what you are looking for.

leiflm commented 3 years ago

Hey, thanks for your quick feedback.

If you adjust the sensitivity, that will change the threshold of the gesture to be detected.

hmm.. the code (_checkActivated and _checkSwipeValid) reads like the threshold refers to the travel distance (i.e. solves https://github.com/mpiannucci/gnome-shell-extended-gestures/issues/19), but does not provide a solution to the requested feature.

What I'm suggesting is implementing flicking recognition as shown here: https://vimeo.com/1933594.

mpiannucci commented 3 years ago

Ahhhhh Ok so you want new gestures. Got it!

mpiannucci commented 3 years ago

In theory, this can be implemented by piggy backing on the existing gestures and just changing the sensitivity to be really low so they trigger fast but only if there is both acceptable acceleration and the direction is perfectly horizontal or vertical

leiflm commented 3 years ago

In theory, this can be implemented by piggy backing on the existing gestures and just changing the sensitivity to be really low so they trigger fast but only if there is both acceptable acceleration and the direction is perfectly horizontal or vertical

You'd still need timing right? I used a more general approach/title ("add timing sensitivity") so that if you add other gestures, you could have both again.

Example pinch (in/out):

  1. pinch to zoom in and out inside a pdf
  2. pinch (fingers towards one another) "quickly" to close the pdf viewer window