public abstract class

KeyCodeEvent

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.KeyCodeEvent<H extends com.google.gwt.event.shared.EventHandler>
Known Direct Subclasses

Class Overview

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

Summary

Public Constructors
KeyCodeEvent()
Public Methods
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?
String toDebugString()
This is a method used primarily for debugging.
[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

Public Constructors

public KeyCodeEvent ()

Public Methods

public int getNativeKeyCode ()

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

Returns
  • the key code

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

public boolean isDownArrow ()

Is this a key down arrow?

Returns
  • whether this is a down arrow key event

public boolean isLeftArrow ()

Is this a left arrow?

Returns
  • whether this is a left arrow key event

public boolean isRightArrow ()

Is this a right arrow?

Returns
  • whether this is a right arrow key event

public boolean isUpArrow ()

Is this a up arrow?

Returns
  • whether this is a right arrow key event

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.