[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] Re: "global" KeyEvent
|
Fortunately the left the add/removeFilter method with package-level
access. Since the SWT jar files aren't sealed, you can do the following
(with warnings about being unsupported, I'm sure):
package org.eclipse.swt.widgets;
public class DisplayUtil {
public static void addFilter(Display display, int eventType, Listener l)
{
display.addFilter(eventType, l);
}
public static void removeFilter(Display display, int eventType, Listener
l) {
display.removeFilter(eventType, l);
}
}
Alun wrote:
> You can't. Not since the addFilter method in the Display class was
> made non-public in release 2.1. It's a pain. The only way I'm aware
> of now is to add a KeyListener to every control, which is ugly.
> Cheers,
> Alun
> F F wrote:
> > Hi all,
> > how can i catch _global_ keyEvent, like Ctrl + F11 in eclipse ?
> > thanx