enbug
enbug

Reputation: 3

Java check mouse button state

How can I check the state of the mouse buttons in Java? I cannot use mouse events, as it involves getting 'mouse released' on an element that has never received 'mouse pressed', so I theoretically could use events if it intercepted mouse events system wide, but that would probably be a security risk. If I can't do this with java, I am happy to write a native interface, and I am developing on Mac 10.6.

Upvotes: 0

Views: 2009

Answers (1)

Kerem Baydoğan
Kerem Baydoğan

Reputation: 10722

Three words:

Global Event Listeners

Upvotes: 1

Related Questions