Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » KeyHandler
KeyHandler [message #226479] Tue, 14 November 2006 12:26 Go to next message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

I am creating a KeyHandler that monitors the state of the CTRL key:

KeyHandler handler = new KeyHandler();
handler.put(KeyStroke.getPressed(SWT.CTRL, 0), new CtrlPressedAction());
handler.put(KeyStroke.getReleased(SWT.CTRL, 0), new CtrlReleasedAction());

The CtrlPressedAction gets run when the CTRL key is pressed, but the
CtrlReleasedAction does not get run when the CTRL key is released. What
is the problem here?

Thanks,

James
Re: KeyHandler [message #226554 is a reply to message #226479] Thu, 16 November 2006 21:15 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi James,

The state mask probably causes the problem. It may not be 0... You'll have
to debug KeyHandler.performStroke() to see what the problem is.

Cheers,
Alex
Re: KeyHandler [message #226593 is a reply to message #226554] Fri, 17 November 2006 11:35 Go to previous message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

Thanks Alex, will explore this.

James
Previous Topic:Mouse events
Next Topic:How to make example work?
Goto Forum:
  


Current Time: Fri Apr 19 21:23:58 GMT 2024

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

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

Back to the top