|Key bindings in custom widgets [message #496814]
||Wed, 11 November 2009 13:29
Registered: February 2013
I have a problem with my custom widget. A table-like widget listens to key events and handles the occurence of the enter-key. Unfortuanetly, one of my Eclipse commands has a binding to that key and therefore is invoked when enter-key is pressed in my widget. My widget can handle the key but it seems that there is no way to prevent the Eclipse command to be executed. Preventing is necessary for my application because the enter-key opens a cell editor in the table and my Eclipse command opens a dialog that obviously interrupts the user. Any ideas? It would be nice to have a key-binding "context" also in single widgets but as far as I know the context can only be set on workbench parts.
I thought that an action delegation like org.eclipse.ui.actions.TextActionHandler can solve the problem by redirecting the Eclipse command to the table but this does not ensure that any other Eclipse command is invoked on enter-key.
Powered by FUDForum
. Page generated in 0.02113 seconds