Middle Mouse button emulation on trackpad?
#1
Hi All,

As a long time Linux user, I am used to the Xwindows method of copy/paste (select text, middle mouse click to paste).

Is there a way to emulate the middle mouse button on the trackpad on the Pinebook 1080?

TIA

----

Using KDE Neon
#2
I've been after this too.
Code:
pinebook 18:26:48 ~> xinput list
⎡ Virtual core pointer                        id=2    [master pointer  (3)]    
⎜   ↳ Virtual core XTEST pointer                    id=4    [slave  pointer (2)]
⎜   ↳ <default pointer>                             id=6    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
↳ Virtual core XTEST keyboard                     id=5    [slave  keyboard (3)]
↳ <default keyboard>                              id=7    [slave  keyboard (3)]
pinebook 18:29:53 ~> xinput list-props 6
Device '<default pointer>':
Device Enabled (115):   1
Coordinate Transformation Matrix (116): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (229):     0
Device Accel Constant Deceleration (230):       1.000000
Device Accel Adaptive Deceleration (231):       1.000000
Device Accel Velocity Scaling (232):    10.000000
Device Node (233):      "/dev/wsmouse"
Button Labels (234):    "Button Left" (118), "Button Middle" (119), "Button Right" (120), "Button Wheel Up" (121), "Button Wheel Down" (122), "Button Horiz Wheel Left" (123), "Button Horiz Wheel Right" (124), "Button Unknown" (228), "Button Unknown" (228)
Mouse Middle Button Emulation (235):    1
Mouse Middle Button Timeout (236):      50
This is on NetBSD, but the commands should apply to anything running Xorg.
In this case, the emulation is already enabled, but can be toggled with:
xinput set-prop 6 235 1

However, in my case, I'm not seeing the button being emulated.
Running xev -event button seems to indicate the trackpad isn't reporting 2 buttons pressed simultaneously.  If I have a button down event on button 1 (left), down on button 3 (right), I get no event reported for button 3.  Similarly, the button up event is always for the first button down.
#3
Thanks bbraun, I see similar output with xinput, but still do not see an emulated button 3 with the trackpad. I thought perhaps one had to press a key and a mouse button, but apparently that is not the case.
#4
To get paste working in the face of apparently no possibility of middle click emulation, I used xbindkeys and xte from xautomation.
However, at least on NetBSD, I noticed xte's injected events wouldn't work if another event was in progress, such as any of the keys used to trigger xte to run (anything else worked, like spawning an xterm, just xte's fake events were ignored). I ended up creating a python script that would fork, parent exit, and the child would sleep for 0.1s and then run xte. That would give enough time for everything to clear, and the paste to be at least kinda timely.
So, xbindkeys runs the python script when I enter my configured key combo, and the python script runs xte to inject the events. Kinda rube goldberg, but it seems to be working.
#5
(11-25-2018, 09:53 PM)bbraun Wrote: So, xbindkeys runs the python script when I enter my configured key combo, and the python script runs xte to inject the events.  Kinda rube goldberg, but it seems to be working.

Sounds like you have something working, although as you say, overly complex. Too bad the track pad doesn't recognize a 3 finger tap (something I use all the time on my Chromebook).
#6
According to the tech.spec of the touchpad 3 finger guestures are actually supported.
http://files.pine64.org/doc/datasheet/pi...cation.pdf
(page 5)

I guess the installed touchpad/mouse driver might not support it ?
#7
(11-27-2018, 02:44 AM)Surehand53 Wrote: I guess the installed touchpad/mouse driver might not support it ?

Thanks. That is good news. It is easier to upgrade SW.
#8
(11-27-2018, 02:44 AM)Surehand53 Wrote: According to the tech.spec of the touchpad 3 finger guestures are actually supported.
http://files.pine64.org/doc/datasheet/pi...cation.pdf
(page 5)

I guess the installed touchpad/mouse driver might not support it ?

That document appears to be inaccurate.  A three and 4 finger tap only generate a null usb report.
#9
(11-27-2018, 01:22 PM)bbraun Wrote: That document appears to be inaccurate.  A three and 4 finger tap only generate a null usb report.

Bummers. I guess I should start reaching for my Mouse to get a middle button click.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? UltraBloxX 6 7,603 12-21-2018, 12:47 AM
Last Post: igorp
  How to adjust trackpad speed? Tofu 3 4,728 11-13-2018, 04:02 PM
Last Post: evilbunny

Forum Jump:


Users browsing this thread: 1 Guest(s)