From a command handler how can I know if it is invoked? [message #660927] |
Tue, 22 March 2011 07:53  |
Eclipse User |
|
|
|
I need to know from a command handler if it is invoked from the keyboard or other means (menu item, mouse, ....).
Why?
Because if it is invoked from the keyboard, which control has the focus matters.
Example:
I have a view with a table and a text field for searching inside the table.
Suppose that Ctrl+C is the shorcut for the command that copies the contents of the current row in the table to the clipboard.
If I select this command from a toolbar, focus doesn't matter.
But if I press Ctrl+C, I would like the behaviour to be adjusted:
- If the text field has the focus
- Or some other control like the table has the focus
I've checked HandlerUtil but haven't seen anything useful.
Any idea?
David
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04510 seconds