I need to catch the combination of Apple + C
in GWT NativePreviewHandler
Here is the code that use to catch CTRL + C
and it works:
nativeEventsHandlerRegistration = Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
@Override
public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
NativeEvent nativeEvent = event.getNativeEvent();
if (Event.getTypeInt(nativeEvent.getType()) == Event.ONKEYDOWN) {
if (nativeEvent.getCtrlKey() && 'C' == nativeEvent.getKeyCode()) {
// do something
}
}
}
});
I need the same thing but for MAC, any ideas?