Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

How to simulate mouse held with key pressed?

$
0
0

@matttang7 wrote:

I’m trying to let the user replace mouse click/held with z or x.
In my keyPressedmethod I put this:
if (key == ‘z’ || key == ‘x’) {
mousePressed(ofGetMouseX(), ofGetMouseY(), 0);
mouseDragged(ofGetMouseX(), ofGetMouseY(), 0);
}
it works for single clicks but it doesn’t simulate dragging when I hold it down.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles