It sounds like the box isn't getting focus.  You might want to attach
a FocusListener to monitor that.  You could also try tabbing to the
box and see if that makes a difference.  Also, do you have any
EventPreviewers active?  Just throwing out ideas...

On Aug 26, 4:29 pm, Michael J <[EMAIL PROTECTED]> wrote:
> I'm trying to create a widget that will always enter the current time
> whenever the user types 't'.  My problem is that the keyboard listener
> does not fire the first time the user clicks on the textbox with the
> mouse, and then presses a keyboard button.  If the textbox is clicked
> on a second time, the listener will fire when the user presses
> keyboard keys
>
> Below is some sample code that I'm trying.  Any help would be greatly
> appreciated.
>
> public class Testbox extends TextBox {
>
> public Testbox() {
> this.addKeyboardListener(
>   new KeyboardListenerAdapter(){
>     public void onKeyDown(Widget sender, char keyCode, int modifiers)
> {
>       GWT.log("pressing a key in testbox", null);
>     }
>   }
> );}}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to