0

How to click on the right button in the mouse with Python ? I search alot in the internet and i didn't find solution.

Thank you for the help .

1 Answers1

1

If you are using pygame, then from http://www.nerdparadise.com/tech/python/pygame/basics/part6/ :

if event.type == pygame.MOUSEBUTTONDOWN:
    if event.button == 1: # left click grows radius 
        radius = min(200, radius + 1)
    elif event.button == 3: # right click shrinks radius 
        radius = max(1, radius - 1)
macfij
  • 3,093
  • 1
  • 19
  • 24