I have been working on this continuously without progress, so hope someone has suggestions, but I thought I would post what I have tried.
Everything I read indicates that the key is in adding:
Option "EmulateThirdButton" "true"
Option "EmulateThirdButtonTimeout" "750"
Option "EmulateThirdButtonMoveThreshold" "50"
to the 10-evdev.conf file (or somewhere in the xorg.conf path – not too worried if this is the ideal play but it is a place that is being called).
I added this to the existing “InputClass” definition that is the catchall for driver evdev for touchscreens. I have also tried setting up a separate section just matching this type.
The Xorg.0.log file shows that it is being seen. It shows:
[ 12.599] (**) Option "xkb_layout" "us"
[ 12.607] (II) config/udev: Adding input device Weida Hi-Tech CoolTouch System (/dev/input/event1)
[ 12.607] (**) Weida Hi-Tech CoolTouch System : Applying InputClass "evdev touchscreen catchall"
[ 12.607] (II) Using input driver 'evdev' for 'Weida Hi-Tech CoolTouch System '
[ 12.607] (**) Weida Hi-Tech CoolTouch System : always reports core events
[ 12.607] (**) evdev: Weida Hi-Tech CoolTouch System : Device: "/dev/input/event1"
[ 12.608] (--) evdev: Weida Hi-Tech CoolTouch System : Vendor 0x2575 Product 0x8753
[ 12.608] (--) evdev: Weida Hi-Tech CoolTouch System : Found absolute axes
[ 12.608] (--) evdev: Weida Hi-Tech CoolTouch System : Found absolute multitouch axes
[ 12.608] (II) evdev: Weida Hi-Tech CoolTouch System : No buttons found, faking one.
[ 12.608] (--) evdev: Weida Hi-Tech CoolTouch System : Found x and y absolute axes
[ 12.608] (--) evdev: Weida Hi-Tech CoolTouch System : Found absolute touchscreen
[ 12.608] (II) evdev: Weida Hi-Tech CoolTouch System : Configuring as touchscreen
[ 12.608] (**) Option "EmulateThirdButton" "true"
[ 12.608] (**) Option "EmulateThirdButtonTimeout" "750"
[ 12.608] (**) Option "EmulateThirdButtonMoveThreshold" "50"
[ 12.609] (**) evdev: Weida Hi-Tech CoolTouch System : YAxisMapping: buttons 4 and 5
[ 12.609] (**) evdev: Weida Hi-Tech CoolTouch System : EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 12.609] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:2575:8753.0001/input/input1/event1"
[ 12.609] (II) XINPUT: Adding extended input device "Weida Hi-Tech CoolTouch System " (type: TOUCHSCREEN, id 7)
[ 12.609] (II) evdev: Weida Hi-Tech CoolTouch System : initialized for absolute axes.
[ 12.611] (**) Weida Hi-Tech CoolTouch System : (accel) keeping acceleration scheme 1
[ 12.611] (**) Weida Hi-Tech CoolTouch System : (accel) acceleration profile 0
[ 12.611] (**) Weida Hi-Tech CoolTouch System : (accel) acceleration factor: 2.000
[ 12.611] (**) Weida Hi-Tech CoolTouch System : (accel) acceleration threshold: 4
[ 12.615] (II) config/udev: Adding input device Weida Hi-Tech CoolTouch System (/dev/input/mouse0)
[ 12.615] (II) No input driver specified, ignoring this device.
[ 12.615] (II) This device may have been added with another device file.
It looks to me as though it is seeing and honoring the right mouse setup. If I do a xinput list-props, I get:
Device 'Weida Hi-Tech CoolTouch System ':
Device Enabled (116): 1
Coordinate Transformation Matrix (117): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (241): 0
Device Accel Constant Deceleration (242): 1.000000
Device Accel Adaptive Deceleration (243): 1.000000
Device Accel Velocity Scaling (244): 10.000000
Device Product ID (234): 9589, 34643
Device Node (235): "/dev/input/event1"
Evdev Axis Inversion (245): 0, 0
Evdev Axis Calibration (246): <no items>
Evdev Axes Swap (247): 0
Axis Labels (248): "Abs MT Position X" (239), "Abs MT Position Y" (240), "None" (0), "None" (0)
Button Labels (249): "Button Unknown" (236), "Button Unknown" (236), "Button Unknown" (236), "Button Wheel Up" (122), "Button Wheel Down" (123)
Evdev Scrolling Distance (250): 0, 0, 0
Evdev Middle Button Emulation (251): 1
Evdev Middle Button Timeout (252): 50
Evdev Third Button Emulation (253): 1
Evdev Third Button Emulation Timeout (254): 750
Evdev Third Button Emulation Button (255): 3
Evdev Third Button Emulation Threshold (256): 50
Evdev Wheel Emulation (257): 0
Evdev Wheel Emulation Axes (258): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (259): 10
Evdev Wheel Emulation Timeout (260): 200
Evdev Wheel Emulation Button (261): 4
Evdev Drag Lock Buttons (262): 0
From the little I know this looks right, though not sure about the middle button emulation (I tried turning it off but it did not disable when the option was set to false).
Here’s a portion of running evtest and trying a long press:
Testing ... (interrupt to exit)
Event: time 1491009642.810498, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 22159
Event: time 1491009642.810498, type 3 (EV_ABS), code 1 (ABS_Y), value 22159
Event: time 1491009642.810498, -------------- SYN_REPORT ------------
Event: time 1491009642.817528, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 22162
Event: time 1491009642.817528, type 3 (EV_ABS), code 1 (ABS_Y), value 22162
Event: time 1491009642.817528, -------------- SYN_REPORT ------------
Event: time 1491009642.824561, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 22166
Event: time 1491009642.824561, type 3 (EV_ABS), code 1 (ABS_Y), value 22166
Event: time 1491009642.824561, -------------- SYN_REPORT ------------
Event: time 1491009642.831523, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 22174
Event: time 1491009642.831523, type 3 (EV_ABS), code 1 (ABS_Y), value 22174
Event: time 1491009642.831523, -------------- SYN_REPORT ------------
Event: time 1491009642.838532, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 22184
Event: time 1491009642.838532, type 3 (EV_ABS), code 1 (ABS_Y), value 22184
Event: time 1491009642.838532, -------------- SYN_REPORT ------------
Event: time 1491009642.844533, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 22181
Event: time 1491009642.844533, type 3 (EV_ABS), code 1 (ABS_Y), value 22181
Event: time 1491009642.844533, -------------- SYN_REPORT ------------
Event: time 1491009642.851526, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 22182
Event: time 1491009642.851526, type 3 (EV_ABS), code 1 (ABS_Y), value 22182
Event: time 1491009642.851526, -------------- SYN_REPORT ------------
Event: time 1491009642.865508, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1491009642.865508, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1491009642.865508, -------------- SYN_REPORT ------------
Event: time 1491009646.736228, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 47
Event: time 1491009646.736228, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1669
Event: time 1491009646.736228, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2434
Event: time 1491009646.736228, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1491009646.736228, type 3 (EV_ABS), code 0 (ABS_X), value 1669
Event: time 1491009646.736228, type 3 (EV_ABS), code 1 (ABS_Y), value 2434
Event: time 1491009646.736228, -------------- SYN_REPORT ------------
Event: time 1491009647.895395, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1668
Event: time 1491009647.895395, type 3 (EV_ABS), code 0 (ABS_X), value 1668
Event: time 1491009647.895395, -------------- SYN_REPORT ------------
Event: time 1491009647.929399, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1667
Event: time 1491009647.929399, type 3 (EV_ABS), code 0 (ABS_X), value 1667
Event: time 1491009647.929399, -------------- SYN_REPORT ------------
Event: time 1491009647.943401, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1666
Event: time 1491009647.943401, type 3 (EV_ABS), code 0 (ABS_X), value 1666
Event: time 1491009647.943401, -------------- SYN_REPORT ------------
Event: time 1491009648.346471, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1665
Event: time 1491009648.346471, type 3 (EV_ABS), code 0 (ABS_X), value 1665
Event: time 1491009648.346471, -------------- SYN_REPORT ------------
Event: time 1491009648.360476, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1664
Event: time 1491009648.360476, type 3 (EV_ABS), code 0 (ABS_X), value 1664
Event: time 1491009648.360476, -------------- SYN_REPORT ------------
Event: time 1491009648.436482, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1491009648.436482, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
I don’t understand, since the touch down is held (and seen to be) so long, the event isn’t changed into a button 3?
Am I on the wrong track?