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 Smoo
Messages: 55
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 message
Sascha Smoo is currently offline Sascha Smoo
Messages: 55
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
Previous Topic:About disposing ressources
Next Topic:Hide file extensions in FileDialog filter
Goto Forum:
  


Current Time: Mon Sep 22 08:15:21 GMT 2014

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

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