EchoEum
Posts: 56
Joined: Mon Aug 01, 2016 1:01 pm

Re: [How To] Two finger touch for right click

Sun Feb 05, 2017 4:30 am

I cant make the file. I'm getting the following when I run make.

Code: Select all

gcc -c -Wall -O2 twofingemu.c
In file included from twofingemu.c:17:0:
/usr/include/linux/input.h:12:22: fatal error: sys/time.h: No such file or directory
 #include <sys/time.h>
                      ^
compilation terminated.
Makefile:12: recipe for target 'twofingemu.o' failed
make: *** [twofingemu.o] Error 1

mikeh8020
Posts: 1
Joined: Thu Mar 02, 2017 5:19 pm

Re: [How To] Two finger touch for right click

Thu Mar 02, 2017 6:04 pm

I get to the "twofing --debug" part and I get the following message.

twofing, the two-fingered daemon
Version 0.1.2.20120708

Input device name: "FT5406 memory based driver"
XInput device ID is 7.
XInput device ID for calibrations is 7.
Start Calibration
No calibration data found, use default values.
No valid axis inversion data found.

The hardware:
Pi3B
Official 7" touchscreen

The software:
Raspbian Jessie
RetroPie installed (manual installation on top of Jessie)

ibex
Posts: 1
Joined: Mon Mar 06, 2017 11:28 am

Re: [How To] Two finger touch for right click

Mon Mar 06, 2017 11:30 am

I have got exactly the same problem as reported by mikeh8020.

Thank you for any help in advance!
mikeh8020 wrote:I get to the "twofing --debug" part and I get the following message.

twofing, the two-fingered daemon
Version 0.1.2.20120708

Input device name: "FT5406 memory based driver"
XInput device ID is 7.
XInput device ID for calibrations is 7.
Start Calibration
No calibration data found, use default values.
No valid axis inversion data found.

The hardware:
Pi3B
Official 7" touchscreen

The software:
Raspbian Jessie
RetroPie installed (manual installation on top of Jessie)

aerowolf
Posts: 2
Joined: Wed Apr 12, 2017 5:15 am

Re: [How To] Two finger touch for right click

Wed Apr 12, 2017 5:18 am

Make that three of us... :?

I've attempted following this short tutorial and checking out the information given at http://plippo.de/p/twofing to no avail. If anyone has sorted out a way to resolve this issue I'd love to hear it. Until then I'm going to keep banging my head against the wall. It has to crack eventually right?

Metallode
Posts: 1
Joined: Wed Apr 12, 2017 3:34 pm

Re: [How To] Two finger touch for right click

Wed Apr 12, 2017 3:43 pm

i think that i found @EchoEum
use

Code: Select all

sudo apt-get install libxtst-dev
or spécificly rewritte this

Code: Select all

 sudo apt-get install build-essential libx11-dev libxtst-dev libxi-dev x11proto-randr-dev libxrandr-dev
EDIT: sorry, aerowolf it was for @EchoEum
Last edited by Metallode on Thu Apr 13, 2017 2:02 pm, edited 2 times in total.

aerowolf
Posts: 2
Joined: Wed Apr 12, 2017 5:15 am

Re: [How To] Two finger touch for right click

Wed Apr 12, 2017 8:46 pm

Metallode wrote:i think that i found
use

Code: Select all

sudo apt-get install libxtst-dev
or spécificly rewritte this

Code: Select all

 sudo apt-get install build-essential libx11-dev libxtst-dev libxi-dev x11proto-randr-dev libxrandr-dev
So what you've done is replace the step where you install the libs

Code: Select all

 sudo apt-get install build-essential libx11-dev libxtst-dev libxi-dev x11proto-randr-dev libxrandr-dev
with this instead?

Code: Select all

sudo apt-get install libxtst-dev
In that case, I'm guessing I should remove all of the other items and just leave libxtst-dev installed. Here's what I'll try when I get a chance:

Code: Select all

sudo apt-get autoremove build-essential libx11-dev libxi-dev x11proto-randr-dev libxrandr-dev
cd twofing-0.1.2
make
sudo cp twofing /usr/bin/
twofing --debug
I've already got the rules file in place, and I'm assuming everything still compiles correctly without the other libs. If I misinterpreted your comment let me know...it'll be a while before I can test it anyway.

wolfmanjm
Posts: 1
Joined: Thu Apr 20, 2017 10:48 pm

Re: [How To] Two finger touch for right click

Thu Apr 20, 2017 11:35 pm

I get the infamous "No valid axis inversion data found."

This stops it running. I solved it by making a simple change to the code...

https://github.com/Plippo/twofing/blob/ ... mu.c#L1036

change this line to..

Code: Select all

readCalibrationData(0);
Then recompile.

Then it seems to work.

FlipPI76
Posts: 2
Joined: Thu Apr 20, 2017 11:28 pm

Re: [How To] Two finger touch for right click

Fri Apr 21, 2017 12:49 am

Everyone who is having problems with Jessie and the debug message "No valid axis inversion data found".
I think I found a workaround... Additional to the installation procedure in the beginning of this thread, I performed the following steps:

Install evdev driver

Code: Select all

sudo apt-get install xserver-xorg-input-evdev
Modify X11-conf (in Jessie it's here: /usr/share/X11/xorg.conf.d)

Code: Select all

sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
At the end of the file add:

Code: Select all

Section "InputClass"
   Identifier "calibration"
   Driver "evdev"
   MatchProduct "FT5406 memory based driver"

   Option "EmulateThirdButton" "1"
   Option "EmulateThirdButtonTimeout" "750"
   Option "EmulateThirdButtonMoveThreshold" "30"
EndSection
Create a new rule-file

Code: Select all

sudo nano /etc/udev/rules.d/70-touchscreen-raspberrypi.rules
Add the lines below

Code: Select all

KERNEL=="event*",ATTRS{name}=="FT5406 memory based driver",SYMLINK+="twofingtouch",MODE="0440"
Reboot your device

Code: Select all

sudo reboot
After reboot check the X11-logfile

Code: Select all

cat /var/log/Xorg.0.log
There you should find something like:

  • [ 13.726] (II) config/udev: Adding input device FT5406 memory based driver (/dev/input/event0)
    [ 13.727] (**) FT5406 memory based driver: Applying InputClass "evdev touchscreen catchall"
    [ 13.727] (**) FT5406 memory based driver: Applying InputClass "libinput touchscreen catchall"
    [ 13.727] (**) FT5406 memory based driver: Applying InputClass "calibration"
    [ 13.727] (II) LoadModule: "evdev"
    [ 13.728] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
    [ 14.621] (II) Module evdev: vendor="X.Org Foundation"
    [ 14.622] compiled for 1.18.4, module version = 2.10.3
    [ 14.622] Module class: X.Org XInput Driver
    [ 14.622] ABI class: X.Org XInput driver, version 22.1
    [ 14.622] (II) Using input driver 'evdev' for 'FT5406 memory based driver'
    [ 14.622] (**) FT5406 memory based driver: always reports core events
    [ 14.622] (**) evdev: FT5406 memory based driver: Device: "/dev/input/event0"
    [ 14.623] (--) evdev: FT5406 memory based driver: Vendor 0 Product 0
    [ 14.623] (--) evdev: FT5406 memory based driver: Found absolute axes
    [ 14.623] (--) evdev: FT5406 memory based driver: Found absolute multitouch axes
    [ 14.623] (II) evdev: FT5406 memory based driver: No buttons found, faking one.
    [ 14.623] (--) evdev: FT5406 memory based driver: Found x and y absolute axes
    [ 14.623] (--) evdev: FT5406 memory based driver: Found absolute touchscreen
    [ 14.623] (II) evdev: FT5406 memory based driver: Configuring as touchscreen
    [ 14.623] (**) Option "EmulateThirdButton" "1"
    [ 14.623] (**) Option "EmulateThirdButtonTimeout" "750"
    [ 14.624] (**) Option "EmulateThirdButtonMoveThreshold" "30"
    [ 14.624] (**) evdev: FT5406 memory based driver: YAxisMapping: buttons 4 and 5
    [ 14.624] (**) evdev: FT5406 memory based driver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    [ 14.624] (**) Option "config_info" "udev:/sys/devices/virtual/input/input0/event0"
    [ 14.624] (II) XINPUT: Adding extended input device "FT5406 memory based driver" (type: TOUCHSCREEN, id 6)
    [ 14.624] (II) evdev: FT5406 memory based driver: initialized for absolute axes.

    [ 14.625] (**) FT5406 memory based driver: (accel) keeping acceleration scheme 1
    [ 14.625] (**) FT5406 memory based driver: (accel) acceleration profile 0
    [ 14.626] (**) FT5406 memory based driver: (accel) acceleration factor: 2.000
    [ 14.626] (**) FT5406 memory based driver: (accel) acceleration threshold: 4
Now start twofing with debug option

Code: Select all

twofing --debug
and you should see

  • twofing, the two-fingered daemon
    Version 0.1.2.20120708

    Input device name: "FT5406 memory based driver"
    XInput device id is 6.
    XInput device id for calibration is 6.
    Start calibration
    No calibration data found, use default values.
    Calibration: MinX: 0; MaxX: 800; MinY: 0; MaxY: 480
    Invert X Axis: No
    Invert Y Axis: No
    Swap Axes: No
    Calibration Matrix: 1.000000 0.000000 0.000000
    0.000000 1.000000 0.000000
    Grab Result: 0
    Reading input from device ... (interrupt to exit)
    Current window: 'lxtermin'
    Use default profile.

Now twofing should work...

Cheers,
Flip

FlipPI76
Posts: 2
Joined: Thu Apr 20, 2017 11:28 pm

Re: [How To] Two finger touch for right click

Fri Apr 21, 2017 3:11 am

For the sake of completeness, here the complete installation from scratch...

Code: Select all

# Install packages
sudo apt-get update && sudo apt-get install build-essential libx11-dev libxi-dev x11proto-randr-dev libxrandr-dev libxtst-dev xserver-xorg-input-evdev

Code: Select all

# Install twofing
cd ~
wget http://plippo.de/dwl/twofing/twofing-0.1.2.tar.gz
tar -xvzf twofing-0.1.2.tar.gz
cd twofing-0.1.2
make && sudo make install

Code: Select all

# create a new rule-file
sudo nano /etc/udev/rules.d/70-touchscreen-raspberrypi.rules

# add the following line
KERNEL=="event*",ATTRS{name}=="FT5406 memory based driver",SYMLINK+="twofingtouch",MODE="0440"

Code: Select all

# modify X11 config
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf

# add the following lines at the end of the file
Section "InputClass"
   Identifier "calibration"
   Driver "evdev"
   MatchProduct "FT5406 memory based driver"

   Option "EmulateThirdButton" "1"
   Option "EmulateThirdButtonTimeout" "750"
   Option "EmulateThirdButtonMoveThreshold" "30"
EndSection

Code: Select all

# Reboot your device
sudo reboot

Code: Select all

# Check if twofing is working 
twofing --debug

Code: Select all

# Add twofing to autostart
nano ~/.config/lxsession/LXDE-pi/autostart

# add the line at the end
@/usr/bin/twofing

Code: Select all

# Cleanup
cd ~
rm -rf ~/twofing-0.1.2

Tozzi1
Posts: 18
Joined: Thu Apr 20, 2017 11:05 pm

Re: [How To] Two finger touch for right click

Fri Apr 21, 2017 5:41 pm

Works like a charm. Thanks a lot, I've been pulling my hair out over this.

Webmets
Posts: 2
Joined: Mon Aug 07, 2017 10:02 am

Re: [How To] Two finger touch for right click

Mon Aug 07, 2017 10:22 am

FlipPI76 wrote:
Fri Apr 21, 2017 12:49 am
Everyone who is having problems with Jessie and the debug message "No valid axis inversion data found".
I think I found a workaround... Additional to the installation procedure in the beginning of this thread, I performed the following steps:

Install evdev driver

Code: Select all

sudo apt-get install xserver-xorg-input-evdev
Modify X11-conf (in Jessie it's here: /usr/share/X11/xorg.conf.d)

Code: Select all

sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
At the end of the file add:

Code: Select all

Section "InputClass"
   Identifier "calibration"
   Driver "evdev"
   MatchProduct "FT5406 memory based driver"

   Option "EmulateThirdButton" "1"
   Option "EmulateThirdButtonTimeout" "750"
   Option "EmulateThirdButtonMoveThreshold" "30"
EndSection
Create a new rule-file

Code: Select all

sudo nano /etc/udev/rules.d/70-touchscreen-raspberrypi.rules
Add the lines below

Code: Select all

KERNEL=="event*",ATTRS{name}=="FT5406 memory based driver",SYMLINK+="twofingtouch",MODE="0440"
Reboot your device

Code: Select all

sudo reboot
After reboot check the X11-logfile

Code: Select all

cat /var/log/Xorg.0.log
There you should find something like:

  • [ 13.726] (II) config/udev: Adding input device FT5406 memory based driver (/dev/input/event0)
    [ 13.727] (**) FT5406 memory based driver: Applying InputClass "evdev touchscreen catchall"
    [ 13.727] (**) FT5406 memory based driver: Applying InputClass "libinput touchscreen catchall"
    [ 13.727] (**) FT5406 memory based driver: Applying InputClass "calibration"
    [ 13.727] (II) LoadModule: "evdev"
    [ 13.728] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
    [ 14.621] (II) Module evdev: vendor="X.Org Foundation"
    [ 14.622] compiled for 1.18.4, module version = 2.10.3
    [ 14.622] Module class: X.Org XInput Driver
    [ 14.622] ABI class: X.Org XInput driver, version 22.1
    [ 14.622] (II) Using input driver 'evdev' for 'FT5406 memory based driver'
    [ 14.622] (**) FT5406 memory based driver: always reports core events
    [ 14.622] (**) evdev: FT5406 memory based driver: Device: "/dev/input/event0"
    [ 14.623] (--) evdev: FT5406 memory based driver: Vendor 0 Product 0
    [ 14.623] (--) evdev: FT5406 memory based driver: Found absolute axes
    [ 14.623] (--) evdev: FT5406 memory based driver: Found absolute multitouch axes
    [ 14.623] (II) evdev: FT5406 memory based driver: No buttons found, faking one.
    [ 14.623] (--) evdev: FT5406 memory based driver: Found x and y absolute axes
    [ 14.623] (--) evdev: FT5406 memory based driver: Found absolute touchscreen
    [ 14.623] (II) evdev: FT5406 memory based driver: Configuring as touchscreen
    [ 14.623] (**) Option "EmulateThirdButton" "1"
    [ 14.623] (**) Option "EmulateThirdButtonTimeout" "750"
    [ 14.624] (**) Option "EmulateThirdButtonMoveThreshold" "30"
    [ 14.624] (**) evdev: FT5406 memory based driver: YAxisMapping: buttons 4 and 5
    [ 14.624] (**) evdev: FT5406 memory based driver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    [ 14.624] (**) Option "config_info" "udev:/sys/devices/virtual/input/input0/event0"
    [ 14.624] (II) XINPUT: Adding extended input device "FT5406 memory based driver" (type: TOUCHSCREEN, id 6)
    [ 14.624] (II) evdev: FT5406 memory based driver: initialized for absolute axes.

    [ 14.625] (**) FT5406 memory based driver: (accel) keeping acceleration scheme 1
    [ 14.625] (**) FT5406 memory based driver: (accel) acceleration profile 0
    [ 14.626] (**) FT5406 memory based driver: (accel) acceleration factor: 2.000
    [ 14.626] (**) FT5406 memory based driver: (accel) acceleration threshold: 4
Now start twofing with debug option

Code: Select all

twofing --debug
and you should see

  • twofing, the two-fingered daemon
    Version 0.1.2.20120708

    Input device name: "FT5406 memory based driver"
    XInput device id is 6.
    XInput device id for calibration is 6.
    Start calibration
    No calibration data found, use default values.
    Calibration: MinX: 0; MaxX: 800; MinY: 0; MaxY: 480
    Invert X Axis: No
    Invert Y Axis: No
    Swap Axes: No
    Calibration Matrix: 1.000000 0.000000 0.000000
    0.000000 1.000000 0.000000
    Grab Result: 0
    Reading input from device ... (interrupt to exit)
    Current window: 'lxtermin'
    Use default profile.

Now twofing should work...

Cheers,
Flip
After following these steps, twofing works, but now whenever I start twofing from commandline, my desktop disapears, and the file manager crashes. Any idea how that happend?

daniel_e
Posts: 1
Joined: Fri Jul 21, 2017 2:17 pm

Re: [How To] Two finger touch for right click

Thu Aug 10, 2017 12:12 pm

I keep getting this annoying error, as I have gone through everything at least 4 times... I can't find my mistake. Can anyone help?

Code: Select all

twofing, the two-fingered daemon
Version 0.1.2.20120708

/dev/twofingtouch: No such file or directory

skinkone
Posts: 1
Joined: Mon Nov 06, 2017 9:56 am

Re: [How To] Two finger touch for right click

Mon Nov 06, 2017 10:03 am

FlipPI76 wrote:
Fri Apr 21, 2017 3:11 am
For the sake of completeness, here the complete installation from scratch...
...
...
Just wanted to thank you: this worked for me except I had to change "FT5406 memory based driver" to "USBest Technology SiS HID Touch Controller" for my Hannspree 27" touchscreen monitor. Perhaps that's an obvious mod to the majority of people reading this, but to someone like me who is just slightly more capable than a trained monkey in all things Linux ( :mrgreen: ), it could end the frustration!

paulkonp
Posts: 1
Joined: Sun Apr 01, 2018 10:47 pm

Re: [How To] Two finger touch for right click

Sun Apr 01, 2018 10:53 pm

Two finger support is working with the instructions by @FlipPI76, however I'm unable to get single finger long-press right-click to work.

Is there a simple way to enable long-press for single finger that will show the right-click context menu? I'm using Quanta OpticalTouchScreen device.

Thanks.

robiv8
Posts: 1
Joined: Mon Mar 14, 2016 9:09 pm

Re: [How To] Two finger touch for right click

Mon Jun 11, 2018 10:07 pm

So i have :
Linux Testrechner 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

I do all step by step but no luck!

[email protected]:~ $ twofing --debug
twofing, the two-fingered daemon
Version 0.1.2.20120708

/dev/twofingtouch: No such file or directory

My /etc/udev/rules.d/70-touchscreen-egalax.rules:

KERNEL=="event*",ATTRS{name}=="eGalaxTouch Virtual Device for Multi",SYMLINK+="twofingtouch",RUN+="/bin/chmod a+r /dev/twofingtouch"
KERNEL=="event*",ATTRS{name}=="FT5406 memory based driver",SYMLINK+="twofingtouch",MODE="0440"

Any help please?

Return to “Official Foundation Display”

Who is online

Users browsing this forum: No registered users and 1 guest