You are not logged in.
Hi!
edit: Finally figured out, that what I was/am looking for is called "debouncing" and there's an xf86-input-evdev-debounce (in AUR, which replaces xf86-input-evdev) for that. Testing it now - mouse movement feels a bit weird (don't know why - like there's something wrong with the acceleration maybe) I if I get used to it and it fixes my problem until tomorrow, I'll mark this as solved.
Short version:
I need something that..
on mouse button 1 release
if there is a mouse button 1 press within 30ms, discards both the button release and the button press
otherwise forwards the mouse button 1 release normally after those 30ms.
( edit: It might already be enough, if I can somehow have all mouse button 1 events discarded for 10ms after every button 1 release. )
Long version:
My (logitech anywhere mx) mouse is a bit broken and started doubleclicking randomly sometimes when I singleclick with the first button. I'd like to work around that on a software lvl.
This is what a single real click (pressing, holding for a bit less than 2 seconds, releasing) affected by the "phantom click" error looks like:
According to xev, the phantom-clicks have always exactly an 8ms pause between release and press. I added date output to get an idea of how this delay might end up looking in a live environment with different scripts interfering:
$ xev | while read line; do echo $line; date +%s:%N; done;
1437908192:032813331
ButtonPress event, serial 40, synthetic NO, window 0x2600001,
1437908192:036166626
root 0x2a2, subw 0x0, time 61478513, (102,83), root:(1220,362),
1437908192:038552008
state 0x0, button 1, same_screen YES
1437908192:040715918
1437908192:346245042
ButtonRelease event, serial 40, synthetic NO, window 0x2600001,
1437908192:349871214
root 0x2a2, subw 0x0, time 61478827, (102,83), root:(1220,362),
1437908192:353918136
state 0x100, button 1, same_screen YES
1437908192:357558859
1437908192:361060929
ButtonPress event, serial 40, synthetic NO, window 0x2600001,
1437908192:364373445
root 0x2a2, subw 0x0, time 61478835, (102,83), root:(1220,362),
1437908192:367874072
state 0x0, button 1, same_screen YES
1437908192:371475765
1437908194:018513793
ButtonRelease event, serial 40, synthetic NO, window 0x2600001,
1437908194:022305784
root 0x2a2, subw 0x0, time 61480499, (102,83), root:(1220,362),
1437908194:026087175
state 0x100, button 1, same_screen YES
1437908194:028776597This is a sample of me actually double clicking for real, just to be on the safe side:
1437909123:638971571
ButtonPress event, serial 40, synthetic NO, window 0x5a00001,
1437909123:642904375
root 0x2a2, subw 0x0, time 62410119, (7,174), root:(1749,249),
1437909123:646284167
state 0x0, button 1, same_screen YES
1437909123:648984383
1437909123:719075540
ButtonRelease event, serial 40, synthetic NO, window 0x5a00001,
1437909123:722815845
root 0x2a2, subw 0x0, time 62410199, (7,174), root:(1749,249),
1437909123:725660770
state 0x100, button 1, same_screen YES
1437909123:729545859
1437909123:800267622
ButtonPress event, serial 40, synthetic NO, window 0x5a00001,
1437909123:802570917
root 0x2a2, subw 0x0, time 62410281, (7,174), root:(1749,249),
1437909123:805912321
state 0x0, button 1, same_screen YES
1437909123:808249346
1437909123:912839298
ButtonRelease event, serial 40, synthetic NO, window 0x5a00001,
1437909123:915433751
root 0x2a2, subw 0x0, time 62410393, (7,174), root:(1749,249),
1437909123:917820785
state 0x100, button 1, same_screen YES
1437909123:920089157So I guess, I need to find some sort of layer that watches out for the button release event and then - if there's another button press within less than 30-50ms - swallows both events.
There's no chance whatsoever that I'll be able to fiddle with the kernel module code enough to do something like this (wasn't even able to find remotely related looking code with my meagre copy+pase "programming" skills), so, instead I tried messing around with xbindkeys + xte a bit. The main problem here seems to be, that I always end up in an endless loop if I try to just send button 1 events when I receive button one events.... so... I would probably have to make xbindkeys start a script that kills xbindkeys, changes its configuration and starts it again... which... is just too dirty / glitchy / stupid... I think?
edit: Failed miserably trying to do it with xbindkeys - I don't think that can even work within a time window of only 20-50ms. Took a look into xf86-input-mouse. Did not manage to understand what it does at all, don't know if that's even the right place, now I'm really out of ideas.
Any better ideas where to start?
Last edited by whoops (2015-07-28 21:52:54)
Offline