public class

KeyPressEvent

extends KeyEvent<H extends EventHandler>
java.lang.Object
   ↳ com.google.gwt.event.shared.GwtEvent<H extends com.google.gwt.event.shared.EventHandler>
     ↳ com.google.gwt.event.dom.client.DomEvent<H extends com.google.gwt.event.shared.EventHandler>
       ↳ com.google.gwt.event.dom.client.KeyEvent<H extends com.google.gwt.event.shared.EventHandler>
         ↳ com.google.gwt.event.dom.client.KeyPressEvent

Class Overview

Represents a native key press event.

Summary

Protected Constructors
KeyPressEvent()
Public Methods
final Type<KeyPressHandler> getAssociatedType()
Returns the type used to register this event.
char getCharCode()
Gets the char code for this event.
static Type<KeyPressHandler> getType()
Gets the event type associated with key press events.
int getUnicodeCharCode()
Gets the Unicode char code (code point) for this event.
String toDebugString()
This is a method used primarily for debugging.
Protected Methods
void dispatch(KeyPressHandler handler)
Should only be called by HandlerManager.
[Expand]
Inherited Methods
From class com.google.gwt.event.dom.client.KeyEvent
From class com.google.gwt.event.dom.client.DomEvent
From class com.google.gwt.event.shared.GwtEvent
From class java.lang.Object
From interface com.google.gwt.event.dom.client.HasNativeEvent

Protected Constructors

protected KeyPressEvent ()

Public Methods

public final Type<KeyPressHandler> getAssociatedType ()

Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

Returns
  • the type

public char getCharCode ()

Gets the char code for this event.

Returns
  • the char code

public static Type<KeyPressHandler> getType ()

Gets the event type associated with key press events.

Returns
  • the handler type

public int getUnicodeCharCode ()

Gets the Unicode char code (code point) for this event.

Returns
  • the Unicode char code

public String toDebugString ()

This is a method used primarily for debugging. It gives a string representation of the event details. This does not override the toString method because the compiler cannot always optimize toString out correctly. Event types should override as desired.

Returns
  • a string representing the event's specifics.

Protected Methods

protected void dispatch (KeyPressHandler handler)

Should only be called by HandlerManager. In other words, do not use or call.

Parameters
handler handler