moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.79k stars 248 forks source link

double click and click #314

Closed ultimaster1 closed 3 years ago

ultimaster1 commented 4 years ago

how can i detect both double click and click

moses-palmer commented 3 years ago

You cannot.

The events reported by this library are lower level than double click as you have noticed; you will receive two separate clicks, and will have to use your own filtering to detect double clicks. If the clicks are close, both spatially and chronologically, it is a double click. Your operating system will have settings for how close they must be to register as double clicks, but pynput does not provide a way to query that.