M
M
Max Kachuriak2021-08-20 22:35:02
Python
Max Kachuriak, 2021-08-20 22:35:02

How to interact with a command using the space bar, mouse button, etc.?

For example, I want to make text appear by pressing the left mouse button, how can I do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kokapuk, 2021-08-20
@Emerister

You are asking the wrong questions.

import mouse

def sayHi():
    print('hi')

mouse.on_click(sayHi)
mouse.wait(button=None)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question