Help - Search - Members - Calendar
Full Version: Touchscreen as touchpad - relative mouse input
OESF Portables Forum > Model Specific Forums > Gemini PDA > Gemini PDA - Linux OS
Kiriririn
A video is worth 1000 words:

https://www.youtube.com/watch?v=bsJn3eMvG7w

tl;dw this technique changes the touchscreen from an absolute mode touchscreen (which is too fiddly for full linux desktop use) into a relative mode touchpad like on most laptops


Easy mode:
  1. sudo apt install xserver-xorg-input-mtrack
  2. Edit /usr/share/X11/xorg.conf.d/40-libinput.conf, find:
    CODE
    Section "InputClass"
            Identifier "libinput touchscreen catchall"
            MatchIsTouchscreen "on"
            MatchDevicePath "/dev/input/event*"
            Driver "libinput"
    EndSection

    Replace with:
    CODE
    Section "InputClass"
            Identifier "libinput touchscreen catchall"
            MatchIsTouchscreen "on"
            MatchDevicePath "/dev/input/event*"
            Driver "mtrack"
            Option "ScrollDistance" "40"
            Option "FingerLow" "1"
            Option "FingerHigh" "2"
            Option "Sensitivity" "1.8"
            Option "BottomEdge" "0"
            Option "SwipeDistance" "100"
            Option "ScaleDistance" "40"
            Option "ButtonMoveEmulate" "false"
            Option "ClickTime" "25"
            Option "MaxTapMove" "55"
            Option "EdgeBottomSize" "0"
    EndSection
  3. sudo systemctl restart sddm or reboot
  4. Recommended to disable acceleration in the LXQT mouse settings GUI
Hard mode:

(Instead of installing mtrack from debian repos, there is an improved version that must be built from source...)
  1. Config edit as above
  2. Enter a suitable empty directory
  3. Install the standard debian build tools
  4. sudo apt install xserver-xorg-dev libmtdev-dev xutils-dev
  5. git clone https://github.com/p2rkw/xf86-input-mtrack
  6. cd into the downloaded folder
  7. ./configure --prefix=/usr
  8. dpkg-buildpackage -uc -us
  9. cd ..
  10. sudo dpkg -i xserver-xorg-input-mtrack_0.5.0_arm64.deb
  11. sudo systemctl restart sddm or reboot
  12. Recommended to disable acceleration in the LXQT mouse settings GUI
shinkamui
Thank you for this! Its an excellent start. Still needs some tweaking, but you've more than got the ball rolling on a very popular request!

Kiriririn
QUOTE(shinkamui @ Jun 17 2018, 05:32 AM) *
Thank you for this! Its an excellent start. Still needs some tweaking, but you've more than got the ball rolling on a very popular request!


Yeah still need to figure out a way to do dragging that doesn't emit a click before doing so, though I reckon this will either require two fingers or add click latency

Edit: it's possible but fiddly by holding with one finger and moving a second
mithrandir
Thx. Very nice work!
Now we have to get this switchable via hotkey... Which seems not no be that easy because of the currently required restart.

Are the different mouse clicks (right,left,middle) already handled somehow? What about scrolling?
Kiriririn
QUOTE(mithrandir @ Jun 17 2018, 02:14 PM) *
Thx. Very nice work!
Now we have to get this switchable via hotkey... Which seems not no be that easy because of the currently required restart.

Are the different mouse clicks (right,left,middle) already handled somehow? What about scrolling?


Not sure how you'd go about switching it, personally I don't see a need for any other mode than this but your needs may be different

Right click is two finger tap, scrolling is two finger scroll, left click is just tap, left click drag is hold then move a second finger, not sure about middle mouse but it should be configurable as 3 finger tap or similar

Scrolling a bit shit and left click drag doesn't work unless you install the latest version ('hard mode' above)
mifritscher
Switching would be nice for applications like xournal or other painting applications. Perhaps this possible by not replacing, but addding the driver and then disable always one of them via xinput?

Bit its ndeed a good start!
mithrandir
QUOTE(mifritscher @ Jun 17 2018, 09:39 PM) *
Switching would be nice for applications like xournal or other painting applications. Perhaps this possible by not replacing, but addding the driver and then disable always one of them via xinput?

Bit its ndeed a good start!


Tried yesterday, but no success so far. Some applications, i.e.,Chrome work better with the "simple" touch interface. Also for the desktop itself the simple interface seems better with a window manager optimized for touch (unsure which one to use). But many applications or parts of it are nearly unusable without control of the mouse pointer. Therefore switching would be great.
psionlover
QUOTE(Kiriririn @ Jun 16 2018, 09:28 PM) *
A video is worth 1000 words:

https://www.youtube.com/watch?v=bsJn3eMvG7w

tl;dw this technique changes the touchscreen from an absolute mode touchscreen (which is too fiddly for full linux desktop use) into a relative mode touchpad like on most laptops

Thanks very much, this makes the gebian much better to handle. I only don't get a grip on the dragging, sometimes it works but mostly not.
Kiriririn
QUOTE(psionlover @ Jun 26 2018, 12:07 AM) *
QUOTE(Kiriririn @ Jun 16 2018, 09:28 PM) *
A video is worth 1000 words:

https://www.youtube.com/watch?v=bsJn3eMvG7w

tl;dw this technique changes the touchscreen from an absolute mode touchscreen (which is too fiddly for full linux desktop use) into a relative mode touchpad like on most laptops

Thanks very much, this makes the gebian much better to handle. I only don't get a grip on the dragging, sometimes it works but mostly not.


The most consistent dragging is by holding one finger and moving another.

Annoyingly the synaptics-style 'double tap but drag rather than releasing the second tap' gesture doesn't work right in mtrack as it emits the first tap, preventing dragging anything that might react to a single tap.
psionlover
QUOTE(Kiriririn @ Jun 26 2018, 12:51 PM) *
The most consistent dragging is by holding one finger and moving another.

Dooesn't work with my version of fingers dry.gif But found a more consistent workaround for my fingers: Alt + tap-drag biggrin.gif
abgd
Works really well. Thanks very much for this tip.
Varti
QUOTE(abgd @ Jul 11 2018, 03:33 AM) *
Works really well. Thanks very much for this tip.

Thanks from me too, I'll definitively use it once I'll install Gemian.

Varti
Alexi Pistonrod
QUOTE(Kiriririn @ Jun 16 2018, 08:28 PM) *
A video is worth 1000 words:

https://www.youtube.com/watch?v=bsJn3eMvG7w

tl;dw this technique changes the touchscreen from an absolute mode touchscreen (which is too fiddly for full linux desktop use) into a relative mode touchpad like on most laptops


Easy mode:
  1. sudo apt install xserver-xorg-input-mtrack
  2. Edit /usr/share/X11/xorg.conf.d/40-libinput.conf, find:
    CODE
    Section "InputClass"
            Identifier "libinput touchscreen catchall"
            MatchIsTouchscreen "on"
            MatchDevicePath "/dev/input/event*"
            Driver "libinput"
    EndSection

    Replace with:
    CODE
    Section "InputClass"
            Identifier "libinput touchscreen catchall"
            MatchIsTouchscreen "on"
            MatchDevicePath "/dev/input/event*"
            Driver "mtrack"
            Option "ScrollDistance" "40"
            Option "FingerLow" "1"
            Option "FingerHigh" "2"
            Option "Sensitivity" "1.8"
            Option "BottomEdge" "0"
            Option "SwipeDistance" "100"
            Option "ScaleDistance" "40"
            Option "ButtonMoveEmulate" "false"
            Option "ClickTime" "25"
            Option "MaxTapMove" "55"
            Option "EdgeBottomSize" "0"
    EndSection
  3. sudo systemctl restart sddm or reboot
  4. Recommended to disable acceleration in the LXQT mouse settings GUI
Hard mode:

(Instead of installing mtrack from debian repos, there is an improved version that must be built from source...)
  1. Config edit as above
  2. Enter a suitable empty directory
  3. Install the standard debian build tools
  4. sudo apt install xserver-xorg-dev libmtdev-dev xutils-dev
  5. git clone https://github.com/p2rkw/xf86-input-mtrack
  6. cd into the downloaded folder
  7. ./configure --prefix=/usr
  8. dpkg-buildpackage -uc -us
  9. cd ..
  10. sudo dpkg -i xserver-xorg-input-mtrack_0.5.0_arm64.deb
  11. sudo systemctl restart sddm or reboot
  12. Recommended to disable acceleration in the LXQT mouse settings GUI




Thanks for this , applied it and it is great however there seem to be many many options we can use to tweak the driver and I am not clear how to click and drag accurately.

How much have you experimented with the settings?
Kiriririn
QUOTE(Alexi Pistonrod @ Sep 19 2018, 08:46 PM) *
Thanks for this , applied it and it is great however there seem to be many many options we can use to tweak the driver and I am not clear how to click and drag accurately.

How much have you experimented with the settings?


For click and drag, touch and hold with one finger, then add a second finger anywhere on the screen and drag with the second finger, keeping the first finger stationary

Unfortunately the 'synaptics-style' click and drag (where you double tap but start dragging on the second tap) doesn't work reliably as it emits a click from the first tap (presumably to avoid input lag)
gemini_user_j
QUOTE(Kiriririn @ Jun 16 2018, 11:28 AM) *
[*]Edit /usr/share/X11/xorg.conf.d/40-libinput.conf, find:

This is amazing!

I have two practical questions, if anyone knows:

1) Is it possible to switch between original behaviour, and the one you enabled by switching between two versions or the file I quoted above?

2) Is it possible to flip the scrolling direction?
ArchiMark
Installed, but have problem getting the button in lower left corner of screen to work now.

I can get taskbar to be visible (it is set to auto-hide to get more vertical height on screen) and can select the button in lower left (it turns blue color), but I cannot get it open up to see all the program selections by tapping on it with finger.

Is there a way to do this with finger tap or is there a key combination to get it open up or ???

Also, is there way to calibrate cursor on screen. It is far off from my finger tap.

Thanks for any help.

Mark
Kiriririn
QUOTE(ArchiMark @ Feb 13 2019, 10:16 PM) *
Installed, but have problem getting the button in lower left corner of screen to work now.

I can get taskbar to be visible (it is set to auto-hide to get more vertical height on screen) and can select the button in lower left (it turns blue color), but I cannot get it open up to see all the program selections by tapping on it with finger.

Is there a way to do this with finger tap or is there a key combination to get it open up or ???

Also, is there way to calibrate cursor on screen. It is far off from my finger tap.

Thanks for any help.

Mark


The whole point of this is to disconnect your cursor from your finger so you can see what youre aiming at and make finer mouse-like actions

It sounds like you're still trying to use the touchscreen like a touchscreen. This behaves more like the Teamviewer or MS RDP apps on Android if youve used those
ArchiMark
QUOTE(Kiriririn @ Feb 15 2019, 11:51 AM) *
QUOTE(ArchiMark @ Feb 13 2019, 10:16 PM) *
Installed, but have problem getting the button in lower left corner of screen to work now.

I can get taskbar to be visible (it is set to auto-hide to get more vertical height on screen) and can select the button in lower left (it turns blue color), but I cannot get it open up to see all the program selections by tapping on it with finger.

Is there a way to do this with finger tap or is there a key combination to get it open up or ???

Also, is there way to calibrate cursor on screen. It is far off from my finger tap.

Thanks for any help.

Mark


The whole point of this is to disconnect your cursor from your finger so you can see what youre aiming at and make finer mouse-like actions

It sounds like you're still trying to use the touchscreen like a touchscreen. This behaves more like the Teamviewer or MS RDP apps on Android if youve used those



Thanks for your help!

Now I get understand the concept....

Will try it again....

Not familiar with apps you mention....I don't use Android...

smile.gif

peter
The "Easy Mode" fix worked perfectly for me with TP2, but I cannot get it to work with TP3. (I haven't tried building from source yet.) Can anyone confirm if this works with the latest Gemian image?

Thanks!
peter
QUOTE(peter @ Jun 14 2019, 02:31 AM) *
The "Easy Mode" fix worked perfectly for me with TP2, but I cannot get it to work with TP3. (I haven't tried building from source yet.) Can anyone confirm if this works with the latest Gemian image?

Thanks!


Never mind. I feel pretty stupid, but when I went to remove mtrack prior to building from source, I discovered that it wasn't installed. sudo apt install fixed the PEBCAK.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.