Re: Adding Event Handlers on the body element...

2010-09-09 Thread Carlos Aguayo
You can try something like this: Event.addNativePreviewHandler(new NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { int KEY_F8 = 119; if (keyup.equals(event.getNativeEvent().getType())

Re: Adding Event Handlers on the body element...

2010-09-09 Thread lineman78
Similarly you should probably also check the type. and you could emulate the normal handler style of the rest of the GWT architecture. Event.addNativePreviewHandler(new NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent

Adding Event Handlers on the body element...

2010-08-09 Thread seth.ho...@gmail.com
Hello, I'm using GWT for 2 years now and i did many great things with it. However, i'm still looking for how to implements KeyboardHandlers on the BodyElement. The only way i found is writing something like this in the HTML file : body onkeypress=return keyPress(event); onkeydown=return