harshadgavali / gnome-gesture-improvements

Touchpad gesture improvements for GNOME on Wayland/X11
https://extensions.gnome.org/extension/4245/gesture-improvements/
GNU General Public License v3.0
324 stars 40 forks source link

Custom keybindings on gestures #3

Open dsseng opened 2 years ago

dsseng commented 2 years ago

Proposal: there are gestures listed in GUI, like 4-finger swipe left/right, 3-finder swipe, 4-finger pinch, 3 finger swipe from the edge of touchpad etc. User can bind them to either a built-in behavior (tracking finger positions) like workspace/window switching, tiling etc or to a keybinding to be triggered (probably the best option for both shell and applications' actions).

harshadgavali commented 2 years ago

Thanks for idea. But libinput currently doesn’t provide information for determining edge swipes (since multiple fingers can be at multiple positions).

For pinch gestures I can think of Zoom in/zoom out actions. Do you have any other actions in mind? (Having some predefined actions mean less dependency on other programs for triggering keyboard events like ydotool)?

dsseng commented 2 years ago

Zoom in/zoom out are already present and not changeable. Everything two-finger seems to be handled by apps and they do it alright (see firefox, eog, chromium should work as well I think). Default actions should be ones present in the extension now and maybe some stuff like opening notifications or right area controls of Shell.

RemyL commented 2 years ago

I have an idea to improve how module works.

First it seems that it's only possible to switch between 2 windows. If we want to change to a third window (or move between all windows) we need to activate the alt+tab menu. Would it be possible to switch between all windows with multiple swipes ?

I also found a gnome extension that modify alt+tab behaviour that would perfectly fit with your extension: https://github.com/dmo60/CoverflowAltTab However when it install it, this extension works well with alt+tab buttons but not with your swipes. (I don't know if the modifications need to be done on your module or CoverflowAltTab module)

AchimStuy commented 2 years ago

23 is implemented as send key to a virtual key board. I could refactor it out to allow any custom keys to some gestures. Question is, how to integrate with the existing gestures (overview navigation, workspace switching, window manipulation, etc.)

I'd also like to have a gesture for closing the current window, which I would solve by sending CTRL + W on pinch.

matthijskooijman commented 2 years ago

I'd also like to see this. I currently use touchegg to send keystrokes for browser forward/back (XF86Forward/XF86Back keys), and also some gestures to control the media player by sending XF86AudioStop or XF86AudioNext keys.

Schneegans commented 1 year ago

This would be a cool feature in combination with the Fly-Pie extension. In there, I use this class to send fake keyboard events. Maybe you could copy this?

Mach1212 commented 2 weeks ago

Any way to add custom keybindings as of now? Is there a roadmap?