我需要捕捉Apple + C
GWT中的组合NativePreviewHandler
这是用于捕获的代码,CTRL + C
它可以工作:
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
}
}
}
});
我需要同样的东西,但对于 MAC,有什么想法吗?