moses-palmer / pynput

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

can't get x1/x2 button mouse events after wake from sleep on win32 #506

Closed raylu closed 1 year ago

raylu commented 1 year ago

Description pynput.mouse.Listener reports Button.x1/Button.x2 click events at first. after putting my machine to sleep and waking it back up, I still get Button.left and Button.right events but no Button.x1 or Button.x2 events

Platform and pynput version windows 10 (21H2 OS Build 19044.2130) pynput: 1.7.3

To Reproduce

import pynput.mouse

def on_click(x, y, button, pressed):
    print(button, pressed)
    return True

with pynput.mouse.Listener(on_click=on_click) as listener:
    listener.join()
raylu commented 1 year ago

ok nevermind, quitting https://www.highrez.co.uk/downloads/xmousebuttoncontrol.htm fixed it