Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.event.dom.client
Class KeyCodeEvent<H extends EventHandler>

    java.lang.Object
      com.google.gwt.event.shared.GwtEvent<H>
          com.google.gwt.event.dom.client.DomEvent<H>
              com.google.gwt.event.dom.client.KeyEvent<H>
                  com.google.gwt.event.dom.client.KeyCodeEvent<H>

Type Parameters:
  `H` - handler type

All Implemented Interfaces:
  HasNativeEvent

Direct Known Subclasses:
  KeyDownEvent, KeyUpEvent

    public abstract class KeyCodeEvent<H extends EventHandler>

extends KeyEvent<H>

Key up and key down are both events based upon a given key code.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.event.dom.client.DomEvent
`DomEvent.Type<H extends EventHandler>`

Constructor Summary
`KeyCodeEvent()`

Method Summary
`int` | `getNativeKeyCode()` Gets the native key code.
`static boolean` | `isArrow(int keyCode)` Does the key code represent an arrow key?
`boolean` | `isDownArrow()` Is this a key down arrow?
`boolean` | `isLeftArrow()` Is this a left arrow?
`boolean` | `isRightArrow()` Is this a right arrow?
`boolean` | `isUpArrow()` Is this a up arrow?
`java.lang.String` | `toDebugString()` This is a method used primarily for debugging.

Methods inherited from class com.google.gwt.event.dom.client.KeyEvent
`isAltKeyDown, isAnyModifierKeyDown, isControlKeyDown, isMetaKeyDown, isShiftKeyDown`

Methods inherited from class com.google.gwt.event.dom.client.DomEvent
`fireNativeEvent, fireNativeEvent, getAssociatedType, getNativeEvent, getRelativeElement, preventDefault, setNativeEvent, setRelativeElement, stopPropagation`

Methods inherited from class com.google.gwt.event.shared.GwtEvent
`assertLive, dispatch, getSource, isLive, kill, revive, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### KeyCodeEvent

    public KeyCodeEvent()

Method Detail

### isArrow

    public static boolean isArrow(int keyCode)

  Does the key code represent an arrow key?

  Parameters:
    `keyCode` - the key code
  Returns:
    if it is an arrow key code

### getNativeKeyCode

    public int getNativeKeyCode()

  Gets the native key code. These key codes are enumerated in the `KeyCodes` class.

  Returns:
    the key code

### isDownArrow

    public boolean isDownArrow()

  Is this a key down arrow?

  Returns:
    whether this is a down arrow key event

### isLeftArrow

    public boolean isLeftArrow()

  Is this a left arrow?

  Returns:
    whether this is a left arrow key event

### isRightArrow

    public boolean isRightArrow()

  Is this a right arrow?

  Returns:
    whether this is a right arrow key event

### isUpArrow

    public boolean isUpArrow()

  Is this a up arrow?

  Returns:
    whether this is a right arrow key event

### toDebugString

    public java.lang.String toDebugString()

  Description copied from class: `GwtEvent`
  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.

  Overrides:
    `toDebugString` in class `GwtEvent<H extends EventHandler>`
  Returns:
    a string representing the event's specifics.

Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD