|
|
Re: WorbenchWindow KeyListener [message #447695 is a reply to message #447675] |
Thu, 13 April 2006 01:21 |
Karl Messages: 92 Registered: July 2009 |
Member |
|
|
Thanks for your help.:-)
Oh, at first, I think workbench window can respond to key event only
through key bindings which is assoicated with an action contribution, but
i don't want to use action contribution because it's visible and i need
hidden keys respond to user.These hidden keys respond execute some system
administration functions like lock, unlock etc.This is the cause why i ask
workbench window key listener.
Workkbench window key event is wrappered by jface action mechanism,so we
can't use addKeyListener to it directly,isn't it?
I saw a link you give in some
post:http://www.magma.ca/~pollockd/despumate/bindingsHowTo.h tml and get
some hints from the following statements:
IKeyBindingService service = site.getKeyBindingService();
yourAction.setActionDefinitionId("existingCommandId");
service.registerAction(yourAction);
then in order to get hidden key respond function, I can define an action
class and register it in runtime and it can do the same thing with action
contribution, is it right?
Regards,
Karl.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03523 seconds