Re: How to capture all key events?

2014-03-17 Thread Robert J. Carr
Thanks, not exactly what I was looking for, but I can probably find a way
to make this work in the way i'd like.  Thanks!


On Mon, Mar 17, 2014 at 4:10 PM, Jim Douglas  wrote:

> This might do what you need:
>
>
> http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/Event.html#addNativePreviewHandler(com.google.gwt.user.client.Event.NativePreviewHandler)
>
> On Monday, March 17, 2014 2:39:37 PM UTC-7, rjcarr wrote:
>>
>> Using the DOM directly you'd add an event listener to the document (there
>> are several ways to do this).
>>
>> But looking at the GWT API I don't see a way to do this.  I've looked at
>> Window and Document and neither seem to have anything about adding key
>> handlers.  In order do this you need to use something with a
>> HasKeyPressHandler.  But this only works on certain elements, and more
>> importantly, it only works when the element is focused and I'd like to
>> capture all key events instead.
>>
>> Is there a way to do this in GWT?
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Web Toolkit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/2wBydkvZeCk/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to capture all key events?

2014-03-17 Thread Jim Douglas
This might do what you need:

http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/Event.html#addNativePreviewHandler(com.google.gwt.user.client.Event.NativePreviewHandler)

On Monday, March 17, 2014 2:39:37 PM UTC-7, rjcarr wrote:
>
> Using the DOM directly you'd add an event listener to the document (there 
> are several ways to do this).
>
> But looking at the GWT API I don't see a way to do this.  I've looked at 
> Window and Document and neither seem to have anything about adding key 
> handlers.  In order do this you need to use something with a 
> HasKeyPressHandler.  But this only works on certain elements, and more 
> importantly, it only works when the element is focused and I'd like to 
> capture all key events instead.
>
> Is there a way to do this in GWT?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to capture all key events?

2014-03-17 Thread rjcarr
Using the DOM directly you'd add an event listener to the document (there 
are several ways to do this).

But looking at the GWT API I don't see a way to do this.  I've looked at 
Window and Document and neither seem to have anything about adding key 
handlers.  In order do this you need to use something with a 
HasKeyPressHandler.  But this only works on certain elements, and more 
importantly, it only works when the element is focused and I'd like to 
capture all key events instead.

Is there a way to do this in GWT?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.