📅  最后修改于: 2022-03-11 14:46:40.857000             🧑  作者: Mango
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.MOUSEBUTTONDOWN:
if event.button == 1:
print("left mouse button")
elif event.button == 2:
print("middle mouse button")
elif event.button == 3:
print("right mouse button")
elif event.button == 4:
print("mouse wheel up")
elif event.button == 5:
print("mouse wheel down")