如何使用Python单击鼠标右键? 我在互联网上搜索很多,但我找不到解决方案。
感谢您的帮助。
答案 0 :(得分:1)
如果您使用的是pygame,则来自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)