iberianpig / fusuma

Multitouch gestures with libinput driver on Linux
MIT License
3.63k stars 146 forks source link

Executing any three finger gesture it still gets passed on to the application #211

Closed zakhar-bykov closed 2 years ago

zakhar-bykov commented 3 years ago

Describe the bug When executing any three finger gesture it still gets passed on to the application. Example: When I scroll in Google Chrome on a webpage or any application with scrolling views with three fingers up / down (fusuma simulates pressing a super key and shows me all open apps in that workspace) or scrolls left / right (fusuma emulates switching tab / shift tab) the gesture does not start and fusuma doesn't show it in the console (not in --daemon mode). Sometimes it works, sometimes it doesn't.

To Reproduce Steps to reproduce the behavior:

  1. Open any site in Google Chrome
  2. Scrolling with three fingers in any direction

Expected behavior Three-fingers scrolling up / down - show all open apps in this workspace (press super key). Three-fingers scrolling left / right - switching between tabs in browser (press tab / shift tab).

Versions It hapends on versions 1.9.? and 1.11.1. Don't know about this issue on another versions.

I, [2020-11-23T16:15:24.246493 #28888]  INFO -- : reload config: /home/zakhar/.config/fusuma/config.yml
I, [2020-11-23T16:15:24.281383 #28888]  INFO -- : ---------------------------------------------
I, [2020-11-23T16:15:24.281424 #28888]  INFO -- : Fusuma: 1.11.1
I, [2020-11-23T16:15:24.283430 #28888]  INFO -- : libinput: 1.10.4
I, [2020-11-23T16:15:24.284288 #28888]  INFO -- : OS: Linux 5.4.0-54-generic #60~18.04.1-Ubuntu SMP Fri Nov 6 17:25:16 UTC 2020
I, [2020-11-23T16:15:24.285069 #28888]  INFO -- : Distribution: Ubuntu 18.04.5 LTS \n \l
I, [2020-11-23T16:15:24.285794 #28888]  INFO -- : Desktop session: ubuntu x11
I, [2020-11-23T16:15:24.285826 #28888]  INFO -- : ---------------------------------------------
I, [2020-11-23T16:15:24.285854 #28888]  INFO -- : Enabled Plugins:
I, [2020-11-23T16:15:24.285941 #28888]  INFO -- :   Fusuma::Plugin::Buffers::GestureBuffer
I, [2020-11-23T16:15:24.285958 #28888]  INFO -- :   Fusuma::Plugin::Detectors::PinchDetector
I, [2020-11-23T16:15:24.285969 #28888]  INFO -- :   Fusuma::Plugin::Detectors::RotateDetector
I, [2020-11-23T16:15:24.285980 #28888]  INFO -- :   Fusuma::Plugin::Detectors::SwipeDetector
I, [2020-11-23T16:15:24.285992 #28888]  INFO -- :   Fusuma::Plugin::Events::Records::GestureRecord
I, [2020-11-23T16:15:24.286003 #28888]  INFO -- :   Fusuma::Plugin::Events::Records::IndexRecord
I, [2020-11-23T16:15:24.286014 #28888]  INFO -- :   Fusuma::Plugin::Events::Records::TextRecord
I, [2020-11-23T16:15:24.286024 #28888]  INFO -- :   Fusuma::Plugin::Executors::CommandExecutor
I, [2020-11-23T16:15:24.286035 #28888]  INFO -- :   Fusuma::Plugin::Filters::LibinputDeviceFilter
I, [2020-11-23T16:15:24.286046 #28888]  INFO -- :   Fusuma::Plugin::Filters::LibinputTimeoutFilter
I, [2020-11-23T16:15:24.286057 #28888]  INFO -- :   Fusuma::Plugin::Inputs::LibinputCommandInput
I, [2020-11-23T16:15:24.286229 #28888]  INFO -- :   Fusuma::Plugin::Parsers::LibinputGestureParser
I, [2020-11-23T16:15:24.286244 #28888]  INFO -- : ---------------------------------------------

Additional context My config.yml file:

swipe:
  3:
    left:
      command: 'xte "keydown Control_L" "key Tab" "keyup Control_L"'
      threshold: 0.8
      interval: 0.4
    right:
      command: 'xte "keydown Control_L" "keydown Shift_L" "key Tab" "keyup Shift_L" "keyup Control_L"'
      threshold: 0.8
      interval: 0.4
    up:
      command: 'xte "key Super_L"'
      threshold: 0.6
      interval: 1
    down:
      command: 'xte "key Super_L"'
      threshold: 0.6
      interval: 1
  4:
    left:
      command: 'xte "keydown Alt_L" "key Right" "keyup Alt_L"'
      threshold: 1
      interval: 0.3
    right:
      command: 'xte "keydown Alt_L" "key Left" "keyup Alt_L"'
      threshold: 1
      interval: 0.3
    up:
      command: 'xte "keydown Control_L" "keydown Super_L" "key Down" "keyup Super_L" "keyup Control_L"'
      threshold: 0.6
      interval: 0.8
    down:
      command: xte "keydown Control_L" "keydown Super_L" "key Up" "keyup Super_L" "keyup Control_L"
      threshold: 0.6
      interval: 0.8
pinch:
  2:
    in:
      command: 'xte "keydown Control_L" "key plus" "keyup Control_L"'
    out:
      command: 'xte "keydown Control_L" "key minus" "keyup Control_L"'
#rotate:
#  3:
#    clockwise:
#      command: 'amixer set Master 10+'
#    counterclockwise:
#      command: 'amixer set Master 10-'

threshold:
  swipe: 0.4
  pinch: 0.4

interval:
  swipe: 0.2
  pinch: 2
iberianpig commented 3 years ago

I checked with your config.yml and libinput v1.10.4, but I can't reproduce... What are you using the touchpad device? You can check it with fusuma -l

zakhar-bykov commented 3 years ago

SynPS/2 Synaptics TouchPad

More info: By running the command fusuma -l

I, [2020-11-26T01:35:59.154532 #31151]  INFO -- : reload config: /home/zakhar/.config/fusuma/config.yml
I, [2020-11-26T01:35:59.189719 #31151]  INFO -- : ---------------------------------------------
I, [2020-11-26T01:35:59.189774 #31151]  INFO -- : Fusuma: 1.11.1
I, [2020-11-26T01:35:59.192368 #31151]  INFO -- : libinput: 1.10.4
I, [2020-11-26T01:35:59.193368 #31151]  INFO -- : OS: Linux 5.4.0-54-generic #60~18.04.1-Ubuntu SMP Fri Nov 6 17:25:16 UTC 2020
I, [2020-11-26T01:35:59.194744 #31151]  INFO -- : Distribution: Ubuntu 18.04.5 LTS \n \l
I, [2020-11-26T01:35:59.195870 #31151]  INFO -- : Desktop session: ubuntu x11
I, [2020-11-26T01:35:59.195918 #31151]  INFO -- : ---------------------------------------------
I, [2020-11-26T01:35:59.195954 #31151]  INFO -- : Enabled Plugins: 
I, [2020-11-26T01:35:59.196091 #31151]  INFO -- :   Fusuma::Plugin::Buffers::GestureBuffer
I, [2020-11-26T01:35:59.196130 #31151]  INFO -- :   Fusuma::Plugin::Detectors::PinchDetector
I, [2020-11-26T01:35:59.196167 #31151]  INFO -- :   Fusuma::Plugin::Detectors::RotateDetector
I, [2020-11-26T01:35:59.196214 #31151]  INFO -- :   Fusuma::Plugin::Detectors::SwipeDetector
I, [2020-11-26T01:35:59.196244 #31151]  INFO -- :   Fusuma::Plugin::Events::Records::GestureRecord
I, [2020-11-26T01:35:59.196277 #31151]  INFO -- :   Fusuma::Plugin::Events::Records::IndexRecord
I, [2020-11-26T01:35:59.196310 #31151]  INFO -- :   Fusuma::Plugin::Events::Records::TextRecord
I, [2020-11-26T01:35:59.196335 #31151]  INFO -- :   Fusuma::Plugin::Executors::CommandExecutor
I, [2020-11-26T01:35:59.196359 #31151]  INFO -- :   Fusuma::Plugin::Filters::LibinputDeviceFilter
I, [2020-11-26T01:35:59.196383 #31151]  INFO -- :   Fusuma::Plugin::Filters::LibinputTimeoutFilter
I, [2020-11-26T01:35:59.196406 #31151]  INFO -- :   Fusuma::Plugin::Inputs::LibinputCommandInput
I, [2020-11-26T01:35:59.196431 #31151]  INFO -- :   Fusuma::Plugin::Parsers::LibinputGestureParser
I, [2020-11-26T01:35:59.196456 #31151]  INFO -- : ---------------------------------------------
SynPS/2 Synaptics TouchPad

By running the command xinput list

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ HP Truevision HD: HP Truevision           id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ HP Wireless hotkeys                       id=12   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=13   [slave  keyboard (3)]

By running the command cat /proc/bus/input/devices

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input4
U: Uniq=
H: Handlers=mouse0 event3 
B: PROP=1
B: EV=b
B: KEY=e520 30000 0 0 0 0
B: ABS=660800011000003
iberianpig commented 3 years ago

I want to isolate the cause of this problem.

Sometimes it works, sometimes it doesn't.

Also, launch a terminal and run libinput debug-events. Check the log when a problem occurs. If libinput debug-events doesn't output any logs of three-finger swipes, Fusuma won't be able to detect them. In that case, it's probably a bug in Libinput.

zakhar-bykov commented 3 years ago

Some of your questions are already answered in my bug report.

This happens anytime the system is running.

When a gesture fails, it is not logged to the console. And when it works - log in. Conclusion - fusuma doesn't always track my gestures.

To activate my gestures, I use a four-finger gesture to switch to and from the next workspace. And again I activate my three-finger gesture and it works.

iberianpig commented 3 years ago

I can't fix the issue that I can't reproduce.

Please try fusuma-plugin-sendkey instead of xte.

MaximoMachado commented 3 years ago

I'm using xdotool and this occurs as well. For example, if I tap with 3 fingers, it'll mute my audio as I've configured it but in Firefox it'll close the tab I am hovering over.

It's possible that 4 finger gestures pass through but maybe there's no applications that use them as defaults.

zakhar-bykov commented 3 years ago

I sometimes have a three-finger gesture that does not work (swipe right left to go through the tabs / up and down to show all applications on this workspace). And to make it work, I use four fingers to switch to another workspace and then switch back. And after this magic with four fingers, the three-finger gesture begins to work.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.