Use event.getNativeCode (or simillar)
El 3 de febrero de 2012 00:14, yl chen <[email protected]> escribió:
> newSymbolTextBox = new TextBox();
> newSymbolTextBox.addKeyPressHandler(new KeyPressHandler() {
> public void onKeyPress(KeyPressEvent event) {
>
> Window.alert("keycode:"+(int)event.getCharCode());
> if (event.getCharCode() ==
> KeyCodes.KEY_ENTER){
> addStock();
> }
>
> }
> });
>
> in ie. when i press enter key, event.getCharCode() is 13.
> in Firefox9, when i press enter key, enent.getCharCode() is 0.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.