Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to get the mouse input in pygame

if event.type == pygame.MOUSEBUTTONDOWN:
    print(event.button)
    
#------------------------#
1 - left click
2 - middle click
3 - right click
4 - scroll up
5 - scroll down
#------------------------#
Comment

PREVIOUS NEXT
Code Example
Python :: get duplicate and remove but keep last in python df 
Python :: dataframe sort by column 
Python :: Add a quit button Tkinter 
Python :: python pandas convert comma separated number string to integer list 
Python :: huggingface default cache dir 
Python :: pandas convert float to int with nan null value 
Python :: how to make python remove the duplicates in list 
Python :: raise an APi error on django rest view 
Python :: python datetime with timezone 
Python :: convert int to hex binary in python 
Python :: pyperclip copy paste 
Python :: python print to stderr 
Python :: python utf8 
Python :: python filename without extension 
Python :: Incorrect number of bindings supplied. The current statement uses 1, and there are 3 supplied. 
Python :: python csv read header only 
Python :: django phone number field 
Python :: how to change canvas background color in python tkinter 
Python :: python number to letter 
Python :: url in form action django 
Python :: python requests cookies 
Python :: discord get user slash command 
Python :: get file names in folder python 
Python :: set dtype for multiple columns pandas 
Python :: binomial coefficient 
Python :: percentage of null values for every variable in dataframe 
Python :: add element to list python at index 
Python :: pandas dataframe select last n columns 
Python :: how to separate a string or int with comma in python 
Python :: pandas iterate over a series 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =