Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Global Key Listener
Global Key Listener [message #1027045] Tue, 26 March 2013 09:56 Go to next message
Eclipse UserFriend
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 07:46 Go to previous messageGo to next message
Eclipse UserFriend
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 13:34 Go to previous message
Eclipse UserFriend
Any outcome in the end, Sascha?
Previous Topic:View
Next Topic:Cannot Edit cells of table using TableViewerColumn.setEditingSupport
Goto Forum:
  


Current Time: Tue Jul 22 22:47:48 EDT 2025

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

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

Back to the top