• Post Reply Bookmark Topic Watch Topic
  • New Topic

Left and Right click

 
Jay Kamdar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can you check if the user pressed the left and right click at the same time? I know how to do left or right click separately.
 
Campbell Ritchie
Marshal
Posts: 52580
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure you can. Have a look in the API specifications; I can find multiple clicks there, but not simultaneous. And is it possible to have two simultaneous clicks at all?

Anybody else got any ideas.

CR
 
Alan Moore
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/InputEvent.html

Check out the getModifiersEx() method. I think the first example shows how to do what you want.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!