Re: Howto listen for global key down events

2011-10-25 Thread Sarjith Pullithodi
On Mon, Sep 19, 2011 at 12:04 PM, Y2i yur...@gmail.com wrote: Have you tried Event.addNativePreviewHandler() http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/Event.html#addNativePreviewHandler(com.google.gwt.user.client.Event.NativePreviewHandler) ? I

Re: Howto listen for global key down events

2011-10-25 Thread Thomas Broyer
How about using a single NativePreviewHandler into which screens (or other widgets) will register? Or how about having thins NativePreviewHandler singleton fire events on the EventBus, and have screens and other widgets add handlers to the EventBus? (BTW, Activities make it easy to manage the

Re: Howto listen for global key down events

2011-09-19 Thread Y2i
Have you tried Event.addNativePreviewHandler() http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/Event.html#addNativePreviewHandler(com.google.gwt.user.client.Event.NativePreviewHandler) ? -- You received this message because you are subscribed to the Google

Re: Howto listen for global key down events

2011-09-19 Thread David
Thanks Y2i! Event.addNativePreviewHandler() does it (see code below)! However, alt, ctrl, and meta doesn't seam to work (shift works)!? Since FocusWidget.setAccessKey(char) handles key combos with the alt key GWT should be able to listen for alt, right? But how? And how do I handle ctrl and meta?