This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
comfilepi:add_a_long-touch_right-click_context_menu [2023/04/19 17:07] COMFILE Technology [Add a touch-and-drag scroll gesture] |
comfilepi:add_a_long-touch_right-click_context_menu [2023/04/19 20:17] (current) COMFILE Technology [Configure Touchscreen Gestures] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Configure Touchscreen Gestures ====== | ====== Configure Touchscreen Gestures ====== | ||
- | The following configurations require the evdev. If it is not already installed, install it with ''sudo apt install xserver-xorg-input-evdev''. For more information about the evdev options and their syntax please see the [[https://linux.die.net/man/4/evdev|evdev manpage]] and the [[https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml#heading9.|InputClass configuration options]]. | + | The following configurations require the evdev. If it is not already installed, install it with ''sudo apt install xserver-xorg-input-evdev''. For more information about the evdev options and their syntax please see the [[https://manpages.debian.org/stable/xserver-xorg-input-evdev/evdev.4.en.html|evdev manpage]] and the [[https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml#heading9|InputClass configuration options]]. |
- | The right-click and scroll configurations can be added into a single ''Section "InputClass"''. | ||
===== Add a long-touch right-click gesture ===== | ===== Add a long-touch right-click gesture ===== | ||
Line 9: | Line 8: | ||
The following procedure will configure X Windows so a long-touch (touch and hold) will simulate a right-click and display a context menu. | The following procedure will configure X Windows so a long-touch (touch and hold) will simulate a right-click and display a context menu. | ||
- | - Create the file ///etc/X11/xorg.conf.d/90-right-click.conf// with the following contents:<code> | + | - Create the file ///etc/X11/xorg.conf.d/90-touch-gestures.conf// with the following contents:<code> |
Section "InputClass" | Section "InputClass" | ||
- | Identifier "touchscreen right-click" | + | Identifier "touch gestures" |
Driver "evdev" | Driver "evdev" | ||
MatchProduct "Microchip Technology Inc. AR1100 HID-MOUSE" | MatchProduct "Microchip Technology Inc. AR1100 HID-MOUSE" | ||
Line 20: | Line 19: | ||
</code> | </code> | ||
- Reboot | - Reboot | ||
- | |||
- | If you use the right-click gesture in combination with the scroll gesture, be sure ''EmulateThirdButtonTimeout'' setting is larger than the ''EmulateWheelTimeout'' setting so they don't conflict. | ||
Line 30: | Line 27: | ||
The following procedure will configure X Windows so when you touch and drag your finger up and down the touchscreen it will scroll. | The following procedure will configure X Windows so when you touch and drag your finger up and down the touchscreen it will scroll. | ||
- | - Create the file ///etc/X11/xorg.conf.d/91-scroll.conf// with the following contents:<code> | + | - Create the file ///etc/X11/xorg.conf.d/90-touch-gestures.conf// with the following contents:<code> |
Section "InputClass" | Section "InputClass" | ||
- | Identifier "touchscreen scroll" | + | Identifier "touch gestures" |
Driver "evdev" | Driver "evdev" | ||
MatchProduct "Microchip Technology Inc. AR1100 HID-MOUSE" | MatchProduct "Microchip Technology Inc. AR1100 HID-MOUSE" | ||
Line 39: | Line 36: | ||
Option "EmulateWheelInertia" "10" | Option "EmulateWheelInertia" "10" | ||
Option "EmulateWheelTimeout" "200" | Option "EmulateWheelTimeout" "200" | ||
+ | Option "YAxisMapping" "4 5" | ||
EndSection | EndSection | ||
</code> | </code> | ||
- Reboot | - Reboot | ||
+ | |||
+ | {{ :comfilepi:roll.mp4?600x338 |}} | ||
+ | <html><center><code>"EmulateWheelInertia" "10"</code></center></html> | ||
+ | |||
+ | {{ :comfilepi:drag.mp4?600x338 |}} | ||
+ | <html><center><code>"EmulateWheelInertia" "100"</code></center></html> | ||
+ | |||
+ | Use <html><code>Option "YAxisMapping" "5 4"</code></html> to invert the scroll direction. |