Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Check if key currently is pressed
Check if key currently is pressed [message #922995] Tue, 25 September 2012 14:20 Go to next message
Martin Missing name is currently offline Martin Missing nameFriend
Messages: 14
Registered: June 2011
Junior Member
Hi,

Been searching around for a way to check if a key is pressed at a certain instance, but the only thing i can find is where you add a listener to listen when a key is pressed. I do not know if this depends on my lack of search skills or whatever. Hope someone can shine some light on this problem for me. Again:

Is there any way to check if a key is pressed or not?

Br.
Martin
Re: Check if key currently is pressed [message #930053 is a reply to message #922995] Tue, 02 October 2012 01:36 Go to previous messageGo to next message
Igor Zapletnev is currently offline Igor ZapletnevFriend
Messages: 33
Registered: September 2012
Member
Hi Martin,

I have custom GEF editor and some predefined shortcuts. For example if user will press "L" - connection tool become active, "P" - pan tool etc.
For this purposes I am using EditDomain methods:

EditDomain:mouseUp(MouseEvent mouseEvent, EditPartViewer viewer)
EditDomain:mouseDown(MouseEvent mouseEvent, EditPartViewer viewer)

Perhaps there are other ways for this purposes but this way works fine for me.

Thanks,
Igor
Re: Check if key currently is pressed [message #932884 is a reply to message #922995] Thu, 04 October 2012 14:33 Go to previous message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Martin Mising name wrote on Tue, 25 September 2012 16:20
Hi,

Is there any way to check if a key is pressed or not?


It depends. In which situation do you need that information?
Previous Topic:ImageFigure with label
Next Topic:D'n'D from one gef editor to another one
Goto Forum:
  


Current Time: Thu Apr 25 18:52:06 GMT 2024

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

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

Back to the top