It can help to remember that GWT generates JavaScript, so GWT concepts
(widgets, events, etc) generally map pretty much directly to
JavaScript concepts.

In this case, you can start with a google search for those events:

http://www.google.com/search?q=keydown+keypress+keyup

The first item in that search is excellent:

http://www.quirksmode.org/dom/events/keys.html

Bookmark and use this site [quirksmode.org, run by Peter-Paul Koch
(ppk)] as a regular reference.

This reference page + test page is also excellent:

http://unixpapa.com/js/key.html
http://unixpapa.com/js/testkey.html

FWIW, JavaScript and Java key events work very similarly, so the Java
KeyEvent documentation is helpful from a conceptual point of view:

http://download.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html

Java KEY_PRESSED = JavaScript keydown
Java KEY_TYPED = JavaScript keypress
Java KEY_RELEASED = JavaScript keyup

On Dec 3, 10:47 am, Greg Dougherty <[email protected]> wrote:
> This is my first entry in what will be a continuing series of pointing
> out GWT JavaDocs achieving Microsoftian levels of "saying everything
> while explaining nothing."  Why? Because if you're going to actually
> write documentation, it shouldn't be totally worthless.
>
> KeyPressHandler: Handler interface for KeyPressEvent events
> KeyDownHandler: Handler interface for KeyDownEvent events
>
> KeyPressEvent : Represents a native key press event
> KeyDownEvent: Represents a native key down event
>
> Does anyone believe this "documentation" provides anything of value?
> I sure don't.  What I want to know is what is teh difference between
> these two things?  What, EXACTLY, is a KeyDownEvent?  How does it
> differ from  KeyPressEvent ?  When would I use one, when would I use
> the other?  Which one should I use if I want to fire off a command
> when the user hits Enter or Return?
>
> The first place most people are going to look to answer these
> questions is the JavaDoc.  If you're programming in Eclipse (and, if
> you're not, you're wasting a lot of time and killing your
> productivity), you get the JavaDoc whenever you hover over one of
> these objects, which means that the fist place to put anything and
> everything the user needs to know is there (you want to put it other
> places, too?  Great.  Disk space is cheap.  Programmer time is not).
>
> So, what IS the difference between the two?  Anyone know?  Because
> while I could make a guess, I'm not paid to guess, I'm paid to know.
> (And yes, I'd be quite happy to pay ~$50 to get JavaDoc for GWT that
> were something more than the pointless repeating of what's already
> there.  Anyone selling something like that for GWT 2.1?)

-- 
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