Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Shift Click event
Shift Click event [message #237985] Thu, 16 August 2007 22:29 Go to next message
Eclipse UserFriend
Originally posted by: mandrake-usa.hotmail.com

How do I find out if the shift key is pressed down when the mouse is
clicked on a figure? I have implemented the "addMouseListener" event; not
sure how to find out if a key was also pressed at the same time. I added a
"addKeyListener" but it doesnt seem to be getting called when a key is
pressed

Any suggestions welcome.

Thanks
Re: Shift Click event [message #237991 is a reply to message #237985] Fri, 17 August 2007 05:20 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
getState method in the MouseEvent class should return you the state of the shift keys (alt and ctrl keys as well)
Re: Shift Click event [message #238014 is a reply to message #237991] Fri, 17 August 2007 16:50 Go to previous message
Eclipse UserFriend
Originally posted by: mandrake-usa.hotmail.com

Thanks a lot! It is funny how sometimes one cannot figure out such a
simple thing:-)
Previous Topic:Draw2d Vertical FlowLayout problem
Next Topic:Draw2d paint problem when dragging with image in Eclipse 3.3
Goto Forum:
  


Current Time: Fri Apr 26 05:00:49 GMT 2024

Powered by FUDForum. Page generated in 0.03293 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top