Skip to content

Update mouse.py#5

Open
BoostedMoose wants to merge 1 commit into
pyinput:masterfrom
BoostedMoose:patch-1
Open

Update mouse.py#5
BoostedMoose wants to merge 1 commit into
pyinput:masterfrom
BoostedMoose:patch-1

Conversation

@BoostedMoose

Copy link
Copy Markdown

Added example code to simulate a left mouse button click.

Added example code to simulate a left mouse button click.
Comment thread examples/mouse.py
time.sleep(0.01)

# Emit left mouse click
device.emit(uinput.BTN_LEFT, 1) # Button pressed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you aware of device.emit_click()? I think most users will want to use that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants