User Tools

Site Tools

한국어

comfilepi:add_a_long-touch_right-click_context_menu

This is an old revision of the document!


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 evdev manpage and the InputClass configuration options.

To implement multiple gestures, combine the Option settings into a single Section "InputClass".

If you use the right-click gesture in combination with the scroll gesture, be sure EmulateWheelTimeout option is larger than the EmulateThirdButtonTimeout option, and the “EmulateThirdButtonMoveThreshold” is appropriate to disambiguate the two.

Add a long-touch right-click gesture

The following procedure will configure X Windows so a long-touch (touch and hold) will simulate a right-click and display a context menu.

  1. Create the file /etc/X11/xorg.conf.d/90-touch-gestures.conf with the following contents:
    Section "InputClass"
        Identifier "touch gestures"
        Driver "evdev"
        MatchProduct "Microchip Technology Inc. AR1100 HID-MOUSE"
        Option "EmulateThirdButton" "1"
        Option "EmulateThirdButtonTimeout" "750"
        Option "EmulateThirdButtonMoveThreshold" "50"
    EndSection
  2. Reboot

Add a touch-and-drag scroll gesture

The following procedure will configure X Windows so when you touch and drag your finger up and down the touchscreen it will scroll.

  1. Create the file /etc/X11/xorg.conf.d/91-touch-gestures.conf with the following contents:
    Section "InputClass"
        Identifier "touch gestures"
        Driver "evdev"
        MatchProduct "Microchip Technology Inc. AR1100 HID-MOUSE"
        Option "EmulateWheel" "1"
        Option "EmulateWheelButton" "1"
        Option "EmulateWheelInertia" "10"
        Option "EmulateWheelTimeout" "200"
    EndSection
  2. Reboot

"EmulateWheelInertia" "10"

"EmulateWheelInertia" "100"

comfilepi/add_a_long-touch_right-click_context_menu.1681894896.txt.gz · Last modified: 2023/04/19 18:01 by COMFILE Technology