I'm using GWT and GXT and want to use keyboard shortcuts like CTRL-S (or CTRL-SHIFT-S) to save the current form. Problem is, I can't figure out how to override the browsers built-in CTRL-S. I tried using a componentEvent and calling stopevent, cancelbubble, etc with no luck. I also tried using
Event.addNativePreviewHandler(new Event.NativePreviewHandler(){
}
and calling event.getNativeEvent().preventDefault();
to try and stop the event but that doesn't work either.
I'm at the point where i can get my keyboard shortcuts to work, but they also fire the browser's event too (like opens a browser save dialog)
Anyone have an idea/hint on how to get this to work? I actually have a number of shortcuts I want to use but many conflict with the browser - just trying to figure out how to override the browser's actions.