Skip to main content



      Home
Home » Eclipse Projects » GEF » KeyHandler
KeyHandler [message #226479] Tue, 14 November 2006 07: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 16:15 Go to previous messageGo to next message
Eclipse UserFriend
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 06: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 May 23 18:35:55 EDT 2025

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

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

Back to the top