Diskio Pi Community

The ultime Open Source Tablet.

You are not logged in.

#1 2018-08-06 09:34:38

Gaara14
Administrator

[Tutorial] Two finger touch for right click on Raspbian (2018 update)

Credit goes to @gadgetoid for finding the method, testing it, and confirming that it works in this thread. https://www.raspberrypi.org/forums/view … 2&start=25 I'm just adding some polish.

Tested with a Raspbian fresh install, 2018-06-27-raspbian-stretch and the 3rd prototype of Diskio Pi with ILITEK Multi-Touch-V3000 touch screen (13'3 capacitive)

It should work with other brands with some little modifications.

1) install twofing

mkdir ~/temp
cd ~/temp
wget http://plippo.de/dwl/twofing/twofing-0.1.2.tar.gz

That should report that "twofing-0.1.2.tar.gz" was saved.

Now we'll add some needed packages, if any of these are already installed it's OK. We'll update first, and then install them with the following commands.

sudo apt-get update
sudo apt-get install build-essential libx11-dev libxtst-dev libxi-dev x11proto-randr-dev libxrandr-dev

Now that those are in place we can extract the downloaded twofing-0.1.2.tar.bz file and compile the binary using "make".

tar -xvzf twofing-0.1.2.tar.gz
cd twofing-0.1.2
make

Now copy "twofing" to /usr/bin

sudo cp twofing /usr/bin/

2) Next we need to create a .rules file in "/etc/udev/rules.d"

sudo nano /etc/udev/rules.d/70-touchscreen-ilitek.rules

SUBSYSTEMS=="usb",ACTION=="add",KERNEL=="event*",ATTRS{idVendor}=="222a",ATTRS{idProduct}=="0001",SYMLINK+="twofingtouch",RUN+="/bin/chmod a+r /dev/twofingtouch"
KERNEL=="event*",ATTRS{name}=="ILITEK Multi-Touch-V3000",SYMLINK+="twofingtouch",RUN+="/bin/chmod a+r /dev/twofingtouch"


3) Install some packages to auto calibrate

sudo apt install xserver-xorg-input-evdev xinput-calibrator

4) Add an X configuration

sudo nano /usr/share/X11/xorg.conf.d/90-touchinput.conf

Section "InputClass"
    Identifier "calibration"
    Driver "evdev"
    MatchProduct "ILITEK Multi-Touch-V3000"
    MatchDevicePath "/dev/input/event*"
    Option "Emulate3Buttons" "True"
    Option "EmulateThirdButton" "1"
    Option "EmulateThirdButtonTimeout" "750"
    Option "EmulateThirdButtonMoveThreshold" "30"
EndSection


5) install udev rules :

sudo nano /etc/udev/rules.d/ 99-input-tagging.rules

ACTION=="add", KERNEL=="event*", SUBSYSTEM=="input", TAG+="systemd", , ENV{SYSTEMD_ALIAS}+="/sys/subsystem/input/devices/$env{ID_SERIAL}"


6) Application on startup :

nano ~/.config/lxsession/LXDE-pi/autostart

@/usr/bin/twofing

7) reboot

sudo reboot

test :

twofing --debug

or via SSH :

export DISPLAY=:0 && twofing --debug

You should see

pi@raspberrypi:~ $ export DISPLAY=:0 && twofing --debug 
twofing, the two-fingered daemon 
Version 0.1.2.20120708 

Input device name: "ILITEK Multi-Touch-V3000" 
XInput device id is 8. 
XInput device id for calibration is 8. 
Start calibration 
No calibration data found, use default values. 
Calibration: MinX: 1; MaxX: 16384; MinY: 1; MaxY: 9600 
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: 'pcmanfm' 
Use default profile.

and the menu appears.
[Ctrl]+[C] to interrupt.

Sources :
https://www.raspberrypi.org/forums/view … p?t=138575
http://www.markamc.co.uk/raspberry-pi-2 … uchscreen/

Offline

Users in this topic: 0 guests, 0 registered users

Board footer

Powered by FluxBB