Showing Posts From
Input handling

- 29 Apr, 2017
- 2 min read
Raspberry Ri Touch Screen setup right click with twofing - Raspbian Jessie
Unfortunately, the Raspberry Pi 7 Touchscreen does not support right-click or long touch if used with Raspbian Jessie. You can add this functionality by using a two-finger touch on the Touchscreen with the program Twofing.Contents Install TwofingYou need a few programs in order to compile Twofing. In case one of those programs is already installed apt-get will automatically recognize this.sudo apt-get update && sudo apt-get install build-essential libx11-dev libxtst-dev libxi-dev x11proto-randr-dev libxrandr-devDownload Twofing. wget http://plippo.de/dwl/twofing/twofing-0.1.2.tar.gzExtract the downloaded file. tar -xvzf twofing-0.1.2.tar.gzNavigate to the folder that was created during the extraction. cd twofing-0.1.2Start the compilation and install Twofing make && sudo make installOptional I used an original Raspberry Pi 7 Touchscreen with Raspberry Jessie and an error occured during the first start of Twofing.twofing, the two-fingered daemon Version 0.1.2.20120708/dev/twofingtouch: No such file or directory You can fix the error as following. Open the 70-touchscreen-egalax.rules file with the nano text editor. sudo nano /etc/udev/rules.d/70-touchscreen-egalax.rules Delete the complete content and add the following lines.KERNEL=="event*",ATTRS{name}=="FT5406 memory based driver",SYMLINK+="twofingtouch",RUN+="/bin/chmod a+r /dev/twofingtouch" Exit the text editor with CTRL+X and confirm the changes with YRestart the Raspberry Pi. sudo rebootDelete the obsolete folder of Twofing in the home folder. rm ~/twofing-0.1.2Start Twofing in debug mode and test with two fingers if the right-click works on the Touchscreen. twofing --debug You can exit the program with CTRL+C. When running the command through SSH and not directly on the Raspberry Pi, the command twofing --debug will not work. You must first set that Twofing uses the Touchscreen. Therefore, add the following command export DISPLAY=:0 and restart Twofing afterwards. twofing --debug In case you connected an additional monitor through HDMI you need to check the index number of the Touchscreen. You can get the index numbers of all connected monitors using who. Source: http://raspberrypi.stackexchange.com/a/27881/14517Twofing autostart In order to not start Twofing after a restart manually you can add a autostart file.Navigate to the autostart folder of your home folder. cd ~/.config/autostartCreate a file with the name twofing.desktop and open it. nano twofing.desktopAdd the following text to the file.[Desktop Entry] Type=Application Name=Twofing Exec=twofing StartupNotify=false Exit the text editor with CTRL+X and confirm the changes with Y