I am using the Python module Pynput to make a macro that will press one of my side buttons. Does anyone know what the side buttons are called in Pynput? For example:
from pynput.mouse import Button, Controller
mouse = Controller()
mouse.press(Button.SIDEBUTTON)
mouse.release(Button.SIDEBUTTON)
What would go in the SIDEBUTTON part?
So this question is a bit old and i had the same problem. I figured out how these buttons are called:
its Button.x1 and Button.x2 for Mouse4 and Mouse5.
Hope I could help you. The script I used to find it is right here:
from pynput.mouse import Listener
def on_click(x, y, button, pressed):
if pressed:
print(button)
# Collect events until released
with Listener(on_click=on_click) as listener:
listener.join()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With