Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RIGHT mouseButton with ALT bug #4711

Closed
theRussetPotato opened this issue Oct 22, 2016 · 4 comments
Closed

RIGHT mouseButton with ALT bug #4711

theRussetPotato opened this issue Oct 22, 2016 · 4 comments

Comments

@theRussetPotato
Copy link

theRussetPotato commented Oct 22, 2016

Here's something I just noticed. Take this simple example:

void setup() {
}

void draw() {
 println(mouseButton); 
}

if I hold the right mouse button it prints 39. Now if I hold down the ALT key then hold the right mouse button it prints 3. 3 is actually the value for CENTER, so what gives?

This is in Processing 2.2.1 in Java mode, and doesn't occur with processing.js.

@quarks
Copy link

quarks commented Oct 22, 2016

This issue appears to be with just the JAVA2D render, when I tried it with P2D it correctly identified the mutton as RIGHT

Tested on OSX with Processing 3.2.1

@benfry
Copy link
Contributor

benfry commented Nov 4, 2016

There's such a thing as a three-button mouse, and depending on your platform, Java will interpret an alt-click as the middle mouse button (the same way that ctrl-click on the Mac is interpreted as a right-click). The P2D behavior is actually incorrect, though I guess you could file a bug for "please remove all 3-button mouse support."

@benfry benfry closed this as completed Nov 4, 2016
@theRussetPotato
Copy link
Author

I'm pretty sure after you alt click, if you hold alt without clicking at all it will still print 39. I'm not in front of a computer to confirm this, but I do remember I could eaily replicate it.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants