Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] How to capture all key event

I posted this question on the eclipse.tools newsgroup, but not getting answer, so I ask here. Forgive me if this is the wrong place. //jml



Hi,
My plugin has a control that I want to it be able to capture all key event. But unfortunately, seemed that it can't capture those menu keyboard shortcut, such as "ALT+F". I tried to trace into swt, and found that readAndDispatch() will call filterMessage(), which will result in calling translateAccelerator(), and which result in calling OS.TranslateAccelerator(), thus Windows will do the dirty work. I can't find a place that I can override the default behavior, Control.translateAccelerator() look like one that I can use, but it is package private.

Any idea how I can work around this?

Thanks in advance.

jml




Back to the top