You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, currently this is my code, i need to constantly check if the left mouse button is pressed, but, this code is taking about 25% of my CPU. How i can solve this problem?
import mouse
def main():
while True:
if mouse.is_pressed(button='left'):
print('Left mouse is down!')
if name == 'main':
main()
The text was updated successfully, but these errors were encountered:
So, currently this is my code, i need to constantly check if the left mouse button is pressed, but, this code is taking about 25% of my CPU. How i can solve this problem?
import mouse
def main():
if name == 'main':
main()
The text was updated successfully, but these errors were encountered: