iberianpig / fusuma

Multitouch gestures with libinput driver on Linux
MIT License
3.67k stars 149 forks source link

Gestures from libinput are not recognised #192

Closed haydenrobins closed 4 years ago

haydenrobins commented 4 years ago

Issue Sorry, this might be a feature request because it's not a very standard environment, I was not sure if this was supposed to be working or not. Fusuma does not seem to be recognising gestures from the libinput messages on my touchscreen device.

When I run: fusuma -v it shows that the touchscreen messages are received but the gestures to not invoke the keypresses.

I expect the three finger swipe down to open a terminal using the xdotool binding in the config file.

Environment ruby-fusuma 1.10.1-1 ruby-fusuma-plugin-sendkey 0.4.0-3 ruby-fusuma-plugin-tap 0.3.0-1

Configs

This config tests both sendkey plugin and xdotool . Because I am getting an error with sendkey I needed to test with the xdotool method as well. The sendkey error is a separate issue but I will include it for reference. fusuma-sendkey -l

sendkey: Keyboard /keyboard/ is not found

config.yml

plugin:
  filters:
    libinput_device_filter:
      keep_device_names:
        - "WaveShare WaveShare"

swipe:
  3:
    up:
      sendkey: "SUPER+RETURN" # Open Terminal using sendkey
    down:
      command: 'xdotool key super+Return' # Open Terminal using xdotool

Other Debug Info

libinput list-devices

Device: WaveShare WaveShare Kernel: /dev/input/event0 Group: 1 Seat: seat0, default Size: 540x320mm Capabilities: touch Tap-to-click: n/a Tap-and-drag: n/a Tap drag lock: n/a Left-handed: n/a Nat.scrolling: n/a Middle emulation: n/a Calibration: identity matrix Scroll methods: none Click methods: none Disable-w-typing: n/a Accel profiles: n/a Rotation: n/a

The following is showing a 3 finger swipe down.


fusuma -v
I, [2020-07-21T23:47:36.504331 #18501]  INFO -- : ---------------------------------------------
I, [2020-07-21T23:47:36.504481 #18501]  INFO -- : Fusuma: 1.10.1
I, [2020-07-21T23:47:36.509492 #18501]  INFO -- : libinput: 1.15.6
I, [2020-07-21T23:47:36.511145 #18501]  INFO -- : OS: Linux 5.4.51-1-ARCH #1 SMP PREEMPT Wed Jul 15 02:48:49 UTC 2020
I, [2020-07-21T23:47:36.512936 #18501]  INFO -- : Distribution: Arch Linux \r (\l)
I, [2020-07-21T23:47:36.523736 #18501]  INFO -- : Desktop session: tty
I, [2020-07-21T23:47:36.523916 #18501]  INFO -- : ---------------------------------------------
I, [2020-07-21T23:47:36.524014 #18501]  INFO -- : Enabled Plugins:
I, [2020-07-21T23:47:36.524332 #18501]  INFO -- :   Fusuma::Plugin::Buffers::GestureBuffer
I, [2020-07-21T23:47:36.524433 #18501]  INFO -- :   Fusuma::Plugin::Buffers::TapBuffer
I, [2020-07-21T23:47:36.524515 #18501]  INFO -- :   Fusuma::Plugin::Detectors::PinchDetector
I, [2020-07-21T23:47:36.524599 #18501]  INFO -- :   Fusuma::Plugin::Detectors::RotateDetector
I, [2020-07-21T23:47:36.524684 #18501]  INFO -- :   Fusuma::Plugin::Detectors::SwipeDetector
I, [2020-07-21T23:47:36.524767 #18501]  INFO -- :   Fusuma::Plugin::Detectors::TapDetector
I, [2020-07-21T23:47:36.524846 #18501]  INFO -- :   Fusuma::Plugin::Events::Records::GestureRecord
I, [2020-07-21T23:47:36.524925 #18501]  INFO -- :   Fusuma::Plugin::Events::Records::IndexRecord
I, [2020-07-21T23:47:36.525003 #18501]  INFO -- :   Fusuma::Plugin::Events::Records::TextRecord
I, [2020-07-21T23:47:36.525156 #18501]  INFO -- :   Fusuma::Plugin::Executors::CommandExecutor
I, [2020-07-21T23:47:36.525234 #18501]  INFO -- :   Fusuma::Plugin::Executors::SendkeyExecutor
I, [2020-07-21T23:47:36.525311 #18501]  INFO -- :   Fusuma::Plugin::Filters::LibinputDeviceFilter
I, [2020-07-21T23:47:36.525387 #18501]  INFO -- :   Fusuma::Plugin::Filters::LibinputTimeoutFilter
I, [2020-07-21T23:47:36.525464 #18501]  INFO -- :   Fusuma::Plugin::Inputs::LibinputCommandInput
I, [2020-07-21T23:47:36.525541 #18501]  INFO -- :   Fusuma::Plugin::Parsers::LibinputGestureParser
I, [2020-07-21T23:47:36.525617 #18501]  INFO -- :   Fusuma::Plugin::Parsers::TapParser
I, [2020-07-21T23:47:36.525697 #18501]  INFO -- : ---------------------------------------------
I, [2020-07-21T23:47:36.527745 #18501]  INFO -- : reload config : /home/hayden/.config/fusuma/config.yml
D, [2020-07-21T23:47:36.536355 #18501] DEBUG -- : {:debug_events=>"stdbuf -oL -- libinput debug-events"}
D, [2020-07-21T23:47:36.567087 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:36 +1000, tag: libinput_command_input, record: -event0   DEVICE_ADDED     WaveShare WaveShare               seat0 default group1  cap:t  size 540x320mm ntouches 5 calib}
D, [2020-07-21T23:47:36.869029 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:36 +1000, tag: libinput_command_input, record: LIBINPUT TIMEOUT}
D, [2020-07-21T23:47:36.881273 #18501] DEBUG -- : {:list_devices=>"libinput list-devices"}
D, [2020-07-21T23:47:37.259912 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:37 +1000, tag: libinput_command_input, record: LIBINPUT TIMEOUT}
D, [2020-07-21T23:47:37.562403 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:37 +1000, tag: libinput_command_input, record: LIBINPUT TIMEOUT}
D, [2020-07-21T23:47:37.864739 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:37 +1000, tag: libinput_command_input, record: LIBINPUT TIMEOUT}
D, [2020-07-21T23:47:38.167254 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record: LIBINPUT TIMEOUT}
D, [2020-07-21T23:47:38.408416 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_DOWN       +0.000s       0 (0) 66.70/63.46 (360.50/203.17mm)}
D, [2020-07-21T23:47:38.410976 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_DOWN       +0.000s       1 (1) 72.34/48.20 (391.00/154.33mm)}
D, [2020-07-21T23:47:38.413310 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_DOWN       +0.000s       2 (2) 59.94/30.14 (324.00/96.50mm)}
D, [2020-07-21T23:47:38.415703 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.000s       }
D, [2020-07-21T23:47:38.496321 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.088s       0 (0) 65.59/63.46 (354.50/203.17mm)}
D, [2020-07-21T23:47:38.498900 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.088s       1 (1) 70.95/48.20 (383.50/154.33mm)}
D, [2020-07-21T23:47:38.501725 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.088s       2 (2) 58.93/30.14 (318.50/96.50mm)}
D, [2020-07-21T23:47:38.504993 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.088s       }
D, [2020-07-21T23:47:38.508876 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.096s       0 (0) 63.18/63.30 (341.50/202.67mm)}
D, [2020-07-21T23:47:38.511670 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.096s       1 (1) 68.18/48.15 (368.50/154.17mm)}
D, [2020-07-21T23:47:38.513920 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.096s       2 (2) 56.98/30.09 (308.00/96.33mm)}
D, [2020-07-21T23:47:38.515576 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.096s       }
D, [2020-07-21T23:47:38.520443 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.112s       0 (0) 59.57/63.04 (322.00/201.83mm)}
D, [2020-07-21T23:47:38.522636 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.112s       1 (1) 64.01/48.05 (346.00/153.83mm)}
D, [2020-07-21T23:47:38.524375 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.112s       2 (2) 54.12/30.04 (292.50/96.17mm)}
D, [2020-07-21T23:47:38.526301 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.112s       }
D, [2020-07-21T23:47:38.528373 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.120s       0 (0) 55.69/62.73 (301.00/200.83mm)}
D, [2020-07-21T23:47:38.530195 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.120s       1 (1) 59.85/47.89 (323.50/153.33mm)}
D, [2020-07-21T23:47:38.531656 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.120s       2 (2) 51.34/29.93 (277.50/95.83mm)}
D, [2020-07-21T23:47:38.532985 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.120s       }
D, [2020-07-21T23:47:38.544441 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.136s       0 (0) 51.80/62.47 (280.00/200.00mm)}
D, [2020-07-21T23:47:38.546217 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.136s       1 (1) 55.78/47.74 (301.50/152.83mm)}
D, [2020-07-21T23:47:38.547591 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.136s       2 (2) 48.38/29.88 (261.50/95.67mm)}
D, [2020-07-21T23:47:38.548946 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.136s       }
D, [2020-07-21T23:47:38.552341 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.144s       0 (0) 47.92/62.21 (259.00/199.17mm)}
D, [2020-07-21T23:47:38.554531 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.144s       1 (1) 51.90/47.58 (280.50/152.33mm)}
D, [2020-07-21T23:47:38.556809 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.144s       2 (2) 45.24/29.78 (244.50/95.33mm)}
D, [2020-07-21T23:47:38.558820 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.144s       }
D, [2020-07-21T23:47:38.561944 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.152s       0 (0) 44.22/62.05 (239.00/198.67mm)}
D, [2020-07-21T23:47:38.564258 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.152s       1 (1) 48.38/47.37 (261.50/151.67mm)}
D, [2020-07-21T23:47:38.565942 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.152s       2 (2) 42.00/29.78 (227.00/95.33mm)}
D, [2020-07-21T23:47:38.567943 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.152s       }
D, [2020-07-21T23:47:38.576212 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.168s       0 (0) 40.80/61.84 (220.50/198.00mm)}
D, [2020-07-21T23:47:38.577690 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.168s       1 (1) 45.14/47.42 (244.00/151.83mm)}
D, [2020-07-21T23:47:38.579130 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.168s       2 (2) 38.67/29.83 (209.00/95.50mm)}
D, [2020-07-21T23:47:38.580944 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.168s       }
D, [2020-07-21T23:47:38.584484 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.176s       0 (0) 38.30/61.63 (207.00/197.33mm)}
D, [2020-07-21T23:47:38.586171 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.176s       1 (1) 42.65/47.58 (230.50/152.33mm)}
D, [2020-07-21T23:47:38.587863 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.176s       2 (2) 35.52/29.98 (192.00/96.00mm)}
D, [2020-07-21T23:47:38.589190 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.176s       }
D, [2020-07-21T23:47:38.592447 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_UP         +0.184s       }
D, [2020-07-21T23:47:38.594470 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_UP         +0.184s       }
D, [2020-07-21T23:47:38.596563 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_MOTION     +0.184s       2 (2) 33.02/30.19 (178.50/96.67mm)}
D, [2020-07-21T23:47:38.598415 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.184s       }
D, [2020-07-21T23:47:38.608283 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_UP         +0.200s       }
D, [2020-07-21T23:47:38.610238 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record:  event0   TOUCH_FRAME      +0.200s       }
D, [2020-07-21T23:47:38.912734 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:38 +1000, tag: libinput_command_input, record: LIBINPUT TIMEOUT}
D, [2020-07-21T23:47:39.215242 #18501] DEBUG -- : {:input_event=>time: 2020-07-21 23:47:39 +1000, tag: libinput_command_input, record: LIBINPUT TIMEOUT}```
iberianpig commented 4 years ago

Currently, touch screen is not supported. However, it can be handled by libinput, so if you make a new parser plugin or something, it may work. Pull requests are welcome!

haydenrobins commented 4 years ago

Understood. I will contribute if I can. Thank you.