plippo / twofing Goto Github PK
View Code? Open in Web Editor NEWDaemon for two finger gestures
Home Page: http://www.plippo.de/p/twofing
Daemon for two finger gestures
Home Page: http://www.plippo.de/p/twofing
I am using Raspberry Pi OS on a Surface RT (bullseye + x11).
When I use twofing, I can emulate right click with two fingers.
However, when I try to scroll in Chromium, it selects text instead of scrolling.
When twofing is not running, I can comfortably scroll with the touch screen in Chromium.
How to restore the normal scrolling behavior in browser while using twofing?
Usually a user wants to aim at something directly.
(Example adding a waypoint on a chartplotter)
So having --click=first default makes more sense.
Thanks
I think all you need instead of all current udev rules is:
SUBSYSTEMS=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="touchscreen0"
SUBSYSTEMS=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="twofingtouch", RUN+="/bin/chmod a+r /dev/twofingtouch"
Since the new driver for the official Raspberry Pi touchscreen was introduced with this patch the touchscreen no longer reports as "FT5406 memory based driver" but as "raspberrypi-ts" instead. To add support for this new driver I suggest adding these lines into the raspberry pi touchscreen rules into rules/70-touchscreen-raspberrypi.rules
# add support for raspberrypi-ts driver introduced by kernel 4.21
ACTION=="add",KERNEL=="event*",ATTRS{name}=="raspberrypi-ts",SYMLINK+="twofingtouch",MODE="0440"
KERNEL=="event*",ATTRS{name}=="raspberrypi-ts",SYMLINK+="twofingtouch",MODE="0440"
or creating a new file with these rules.
xrh0905@RPi3B:~/twofing $ DISPLAY=:0 ./twofing --debug
twofing, the two-fingered daemon
Version 0.1.6.20230112
Input device name: "wch Touch"
XInput device id is 8.
XInput device id for calibration is 8.
Start calibration
No calibration data found, use default values.
Calibration: MinX: 0; MaxX: 4096; MinY: 0; MaxY: 4096
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)
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 20 (X_GetProperty)
Resource id in failed request: 0x1
Serial number of failed request: 43
Current serial number in output stream: 43
I work on a linux distribution focusing on the raspberry pi, which packages the twofing project as an installable package.
See package here: https://github.com/GenPi64/genpi64-overlay/blob/master/x11-misc/twofing/twofing-0.1.2-r2.ebuild
Turns out we're about a decade out of date.
Can you make a new release here on github? Either a tag in git, or using the github "Releases" feature?
That would enable us to update our package to the newest version easily. We're reluctant to do direct git checkouts for a specific commit.
Attempting to set this up with a raspberry pi touchscreen, It seems to transfer all input to the top left corner while twofing is running (but works fine otherwise). Before finding this repo, I did attempt to follow the instructions here, if that might have messed it up?
If it'd be easier, is there any way to manually scale the motion as needed?
twofing, the two-fingered daemon
Version 0.1.5.20200913
Input device name: "raspberrypi-ts"
XInput device id is 6.
XInput device id for calibration is 6.
Start calibration
No calibration data found, use default values.
No valid axis inversion data found, assuming no inversion.
No valid axes swap data found, assuming no swap.
Calibration: MinX: 0; MaxX: 65535; MinY: 0; MaxY: 65535
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)
I'm using Raspberry Pi 4(64bit RasPi OS) with Raspad 3.
In my environment, twofing only works with web-browser. How to make it work anywhere?
See project link on right hand side
twofing seems capable of entering endless loops
I see CPU constantly at 25% consumed by twofing.
Thanks,
--MG
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.