Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Global Key Listener
Global Key Listener [message #1027045] Tue, 26 March 2013 13:56 Go to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Hello,

I'd like to assign a 'global' key listener to my custom eclipse preference page. My page contains some composites with 3 tables as childs. So at the moment I assigned the listener to my parent composite inside the createContents method of the preference page.

parent.gerShell().getDisplay().addFilter(SWT.KeyDown, keyDownListener);


This works fine until I make any selections inside the table. If the table is "active" the key listener is not listening anymore. Are there any other places I have to assign the listener to make it work global? I tried to assign it to the tableViewer control and table but this is not working.

Any ideas?

Greetings,
Sascha
Re: Global Key Listener [message #1027770 is a reply to message #1027045] Wed, 27 March 2013 11:46 Go to previous messageGo to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
ok, I've tried to add a listener to every table in my main composite.

	table1.getTable().addKeyListener(tableKeyListener);
	table2.getTable().addKeyListener(tableKeyListener);
	table3.getTable().addKeyListener(tableKeyListener);


As soon as I make a selection inside one of the tables the listener is not triggered anymore. It seems like loosing the main window focus (this happens if you select an item in the table) turns off the listener.

Help! Smile

Greetings,
Sascha
Re: Global Key Listener [message #1751599 is a reply to message #1027770] Wed, 11 January 2017 18:34 Go to previous message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 109
Registered: January 2015
Senior Member

Any outcome in the end, Sascha?
Previous Topic:SWT source code for 32-bit Eclipse 4.3
Next Topic:About disposing ressources
Goto Forum:
  


Current Time: Tue Aug 22 13:33:19 GMT 2017

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

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