Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Main composite & key press
Main composite & key press [message #462849] Thu, 20 October 2005 13:01 Go to next message
Vitor Tortorello is currently offline Vitor TortorelloFriend
Messages: 6
Registered: July 2009
Junior Member
Hello,

Are there any means to make a main Composite (or even the Shell) to grab a
pressed key while another widget has the focus?

I need to handle the pressed key, no matter which widget has the focus.

Thank you.

Vitor
Re: Main composite & key press [message #462897 is a reply to message #462849] Thu, 20 October 2005 15:14 Go to previous messageGo to next message
Sebastien is currently offline SebastienFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,
Adding a keydown listener to the shell should catch all events, even if
the focus is on any widget. I remember seeing a snippet on Eclipse's web
site demonstrating this.
See : http://www.eclipse.org/swt/snippets/

Seb
Re: Main composite & key press [message #462905 is a reply to message #462897] Thu, 20 October 2005 19:57 Go to previous message
Sebastien is currently offline SebastienFriend
Messages: 20
Registered: July 2009
Junior Member
I checked my code, and with a filter added to the display, you can filter
all types of events.

Eg. : getDisplay().addFilter(SWT.KeyDown, new Listener(){...} );


Seb.
Previous Topic:Cairo + Exception in native code
Next Topic:Gridlayout
Goto Forum:
  


Current Time: Tue Apr 16 19:24:48 GMT 2024

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

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

Back to the top