On 3 mar, 08:40, Txang <david.dominguez.marti...@gmail.com> wrote:
>     public void onKeyPress(Widget sender, char keyCode, int modifiers)
> {
>         Log.debug("pressed: " + keyCode);
>         if (keyCode == KEY_ENTER) {
>                     parseCard(...);
>             }
>         }
>         else if (keyCode == KEY_ESCAPE) {
>             Log.debug("I never see this trace");
>             this.hide();
>         }
>     }

KEY_ESCAPE being "non printable", it's not guaranteed to pass in
onKeyPress, but you should get it in onKeyDown and onKeyUp.
See issues 72, 1061 and 1529:
http://code.google.com/p/google-web-toolkit/issues/detail?id=72
http://code.google.com/p/google-web-toolkit/issues/detail?id=1061
http://code.google.com/p/google-web-toolkit/issues/detail?id=1529

and note that in GWT 1.6, although the behavior didn't really changed
AFAICT, the KeyPressEvent is a KeyEvent while the KeyDownEvent and
KeyUpEvent are KeyCodeEvent's.
And the KeyEvent's JavaDoc has the following warning:
"The native keyboard events are somewhat a mess (http://
www.quirksmode.org/js/keys.html), we do some trivial normalization
here, but do not attempt any complex patching, so user be warned."
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to