I have a touchscreen device for which I have enabled third button emulation in xinput:
Device 'ft5x_ts':
...
Evdev Third Button Emulation (257): 1
Evdev Third Button Emulation Timeout (258): 750
Evdev Third Button Emulation Button (259): 3
Evdev Third Button Emulation Threshold (260): 20
...
(full log)
However, the emulation doesn't work - the right button click events never appear. Here's the sample of xev output:
ButtonPress event, serial 45, synthetic NO, window 0x2000001,
root 0x44, subw 0x0, time 2058845, (94,90), root:(96,117),
state 0x100, button 1, same_screen YES
MotionNotify event, serial 45, synthetic NO, window 0x2000001,
root 0x44, subw 0x0, time 2059658, (94,89), root:(96,116),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 45, synthetic NO, window 0x2000001,
root 0x44, subw 0x0, time 2060101, (94,89), root:(96,116),
state 0x100, is_hint 0, same_screen YES
ButtonRelease event, serial 45, synthetic NO, window 0x2000001,
root 0x44, subw 0x0, time 2060101, (94,89), root:(96,116),
state 0x100, button 1, same_screen YES
As you can see, the interval between ButtonPress and ButtonRelease is greater than 750 ms, and the pointer movement is below the 20 pix threshold, yet xev reports button 1 to be pressed, not button 3.
Ironically, when I configure my USB mouse in the same way, long clicks on button 1 do emulate button 3:
ButtonPress event, serial 45, synthetic NO, window 0x2000001,
root 0x44, subw 0x0, time 2870367, (48,82), root:(50,109),
state 0x0, button 3, same_screen YES
MotionNotify event, serial 45, synthetic NO, window 0x2000001,
root 0x44, subw 0x0, time 2870422, (49,81), root:(51,108),
state 0x400, is_hint 0, same_screen YES
ButtonRelease event, serial 45, synthetic NO, window 0x2000001,
root 0x44, subw 0x0, time 2870590, (49,81), root:(51,108),
state 0x400, button 3, same_screen YES
Can anyone help me out, perhaps point to some anomalies I didn't notice?
PS. Third button emulation used to work with my touchscreen under Debian Wheezy, and stopped working when I upgraded to Jessie. For now, I reverted my last backup to get Wheezy installation back, but I still need a solution as Wheezy is phasing out.