bulletmark / libinput-gestures

Actions gestures on your touchpad using libinput
3.93k stars 241 forks source link

Shortcut for three finger Drag(select) gesture #275

Closed gkdgoutam closed 4 years ago

gkdgoutam commented 4 years ago

Hi,

I wanted to know if there is any shortcut which mimics the three finger drag/select gesture (similar to mac). There are some solution online however not quite working on Elementary OS with libinput.

Kind regards, Goutam

bulletmark commented 4 years ago

I don't have a Mac so please explain clearly what you are looking for. Note that this utility only actions commands in response to what libinput calls gestures, nothing else.

Also, as the instructions say, please include the output of libinput-gestures -l here so I can see what environment you are running on.

gkdgoutam commented 4 years ago

Hi, here is the output:

$ libinput-gestures -l

libinput-gestures: session pantheon+x11 on Linux-5.4.0-48-generic-x86_64-with-elementary-5.1.7-hera, python 3.6.9, libinput 1.10.4
/usr/bin/libinput-gestures: hash b1fb733b08ae7c49c1660382dd44a5ed
Gestures configured in /etc/libinput-gestures.conf:
swipe up           _internal ws_up
swipe down         _internal ws_down
swipe left         xdotool key alt+Right
swipe right        xdotool key alt+Left
pinch in           xdotool key super+s
pinch out          xdotool key super+s
libinput-gestures: device /dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event-mouse(event10): SYNA8004:00 06CB:CD8B Touchpad

What I meant is that if there is any shortcut which eventually I can integrate into gesture for three-finger dragging. Here is a video to clarify what I meant by three finger drag (https://www.youtube.com/watch?v=jf2JsstwAA0&ab_channel=fresswolf)

Also I wanted to know the shortcut/combination for pinch-zoom, pinch-rotate ( https://wayland.freedesktop.org/libinput/doc/latest/gestures.html#gestures-swipe )

bulletmark commented 4 years ago

Still not sure what you are expecting for a "shortcut". This utility merely maps global libinput gestures (i.e. a swipe or a pinch as defined in the libpinput docs) that I already referred to.

I also don't understand your second question. You are asking about "pinch-zoom" and "pinch-rotate" but you provided a link to libinput swipe gestures?

Note a "pinch" is a gesture but a "zoom" or a "rotate" is an action. Libinput only interprets the primitive swipe and pinch gestures and then it is up to applications to interpret those gestures into actions however they like. E.g. most Linux image viewers (certainly GNOME image viewer EOG) will zoom an image in and out as you pinch in and out. Try it as you likely already have that. I do on GNOME Wayland without any configuration. Likewise a CAD style program will also rotate the graphic as you rotate the pinch. It does not always make sense to do a zoom, e.g. in a mail program, so libinput must leave that interpretation to apps. Libinput-gestures simply allows you to map extra global (i.e. system wide) gestures to global actions. I map swipes left/right to alt+right/left simply because so many apps use this mapping to go forwards/backwards. If you can find or craft some command to do what you want then libinput-gestures simply allows you to action that command via a swipe or a pinch in various directions and with an arbitrary number of fingers.

gkdgoutam commented 4 years ago

Apologies for the wrong phrases. Just wanted to know similar command which I could set for three finger drag similar to 4finger swipe left xdotool key super+Right which allows to switch workspaces when four-finger swiped left. I know this is due to the fact that there is already a keyboard shortcut for this which is super+Right and that is being implemented in libinput gesture as xdotool key super+Right. I was wondering for a similar approach for three finger drag. Now I am not sure whether there is any shortcut for this and hence seeking help. Similar applies to the case when I want to zoom in/out or rotate some pictures. With the default setting I do not have these.

bulletmark commented 4 years ago

You say "I want to zoom in/out or rotate some pictures. With the default setting I do not have these". Did you read that large last paragraph in my response above?! Likely, you already do already have the pinch to zoom in/out function. Did you try it?!

Edit: may not work with Xorg since Libinput is primarily intended for Wayland. So you would have to move to a Wayland based DE.

bulletmark commented 4 years ago

No response from @gkdgoutam so closing ...