Reputation: 37238
I bought this Microsoft Scult Ergonomic mouse. When I tilt the wheel right/left, it sends multiple horizontal_wheel left/right events (keeps sending as long as its tilted), rather then just one. So I wanted to use autohotkey to prevent more then one going through per tilt. Is this possible?
Basically everytime a horizontal_wheel event comes in i want to record its time, if the consequent event is also horizontal_wheel, and is within < 70ms then block it. Even though blocked, I want to update the timestamp, so it continues to block the horintonal_wheel repetitions. I have to do it this way because when tilt is released, there is no event saying so.
Thanks
Upvotes: 0
Views: 90
Reputation: 73526
Something like this should get you started:
$WheelLeft::
$WheelRight::
if (A_PriorHotkey != A_ThisHotkey || A_TimeSincePriorHotkey > 70) {
send % "{" substr(A_ThisHotkey, 2) "}"
}
return
The event names might be different, check those by opening AutoHotkey window from the shell tray and switch to View -> Key history CtrlK
Upvotes: 1