Hi vidyanad, Just try with addKeyUpHandler() event instead.
GWT 2.1 seems to tackle the key events problems which were somekind of 'mess' until 2.1. You have tried to use the addKeyPress() handler, but be aware that in theory: "keypress - Fires when an actual character is being inserted in, for instance, a text input. It repeats while the user keeps the key depressed." So the ENTER key is not handled because it MIGHT be considered as a KeyUp event. HTH On Jun 4, 6:28 pm, vidyanand <[email protected]> wrote: > Hi > > I just updated to GWT 2.1 Milestone 1 build and after that I am having > problems with registering the Enter key pressed in a text box. > > If I have the following block , it never enters it. > > if (event.getCharCode() == KeyCodes.KEY_ENTER) { > // DO SOMETHING IN HER > > } > > I tried printing out the event.getCharCode() when the ENTER KEY is > pressed and all I get is a blank String. > > Was this changed on purpose or is this a bug ? -- 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.
