public interface

KeyboardListener

implements EventListener
com.google.gwt.user.client.ui.KeyboardListener
Known Indirect Subclasses

This interface is deprecated.
use KeyDownHandler, KeyUpHandler and/or KeyPressHandler instead

Class Overview

Event listener interface for keyboard events.

Summary

Constants
int KEY_ALT This constant is deprecated. use KEY_ALT instead
int KEY_BACKSPACE This constant is deprecated. use KEY_BACKSPACE instead
int KEY_CTRL This constant is deprecated. use KEY_CTRL instead
int KEY_DELETE This constant is deprecated. use KEY_DELETE instead
int KEY_DOWN This constant is deprecated. use KEY_DOWN instead
int KEY_END This constant is deprecated. use KEY_END instead
int KEY_ENTER This constant is deprecated. use KEY_ENTER instead
int KEY_ESCAPE This constant is deprecated. use KEY_ESCAPE instead
int KEY_HOME This constant is deprecated. use KEY_HOME instead
int KEY_LEFT This constant is deprecated. use KEY_LEFT instead
int KEY_PAGEDOWN This constant is deprecated. use KEY_PAGEDOWN instead
int KEY_PAGEUP This constant is deprecated. use KEY_PAGEUP instead
int KEY_RIGHT This constant is deprecated. use KEY_RIGHT instead
int KEY_SHIFT This constant is deprecated. use KEY_SHIFT instead
int KEY_TAB This constant is deprecated. use KEY_TAB instead
int KEY_UP This constant is deprecated. use KEY_UP instead
int MODIFIER_ALT This constant is deprecated. use isAltKeyDown() instead
int MODIFIER_CTRL This constant is deprecated. use isControlKeyDown() instead
int MODIFIER_META This constant is deprecated. use isMetaKeyDown() instead
int MODIFIER_SHIFT This constant is deprecated. use isShiftKeyDown() instead
Public Methods
abstract void onKeyDown(Widget sender, char keyCode, int modifiers)
This method is deprecated. use onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent) instead
abstract void onKeyPress(Widget sender, char keyCode, int modifiers)
This method is deprecated. use onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent) instead
abstract void onKeyUp(Widget sender, char keyCode, int modifiers)
This method is deprecated. use onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent) instead

Constants

public static final int KEY_ALT

This constant is deprecated.
use KEY_ALT instead

Constant Value: 18 (0x00000012)

public static final int KEY_BACKSPACE

This constant is deprecated.
use KEY_BACKSPACE instead

Constant Value: 8 (0x00000008)

public static final int KEY_CTRL

This constant is deprecated.
use KEY_CTRL instead

Constant Value: 17 (0x00000011)

public static final int KEY_DELETE

This constant is deprecated.
use KEY_DELETE instead

Constant Value: 46 (0x0000002e)

public static final int KEY_DOWN

This constant is deprecated.
use KEY_DOWN instead

Constant Value: 40 (0x00000028)

public static final int KEY_END

This constant is deprecated.
use KEY_END instead

Constant Value: 35 (0x00000023)

public static final int KEY_ENTER

This constant is deprecated.
use KEY_ENTER instead

Constant Value: 13 (0x0000000d)

public static final int KEY_ESCAPE

This constant is deprecated.
use KEY_ESCAPE instead

Constant Value: 27 (0x0000001b)

public static final int KEY_HOME

This constant is deprecated.
use KEY_HOME instead

Constant Value: 36 (0x00000024)

public static final int KEY_LEFT

This constant is deprecated.
use KEY_LEFT instead

Constant Value: 37 (0x00000025)

public static final int KEY_PAGEDOWN

This constant is deprecated.
use KEY_PAGEDOWN instead

Constant Value: 34 (0x00000022)

public static final int KEY_PAGEUP

This constant is deprecated.
use KEY_PAGEUP instead

Constant Value: 33 (0x00000021)

public static final int KEY_RIGHT

This constant is deprecated.
use KEY_RIGHT instead

Constant Value: 39 (0x00000027)

public static final int KEY_SHIFT

This constant is deprecated.
use KEY_SHIFT instead

Constant Value: 16 (0x00000010)

public static final int KEY_TAB

This constant is deprecated.
use KEY_TAB instead

Constant Value: 9 (0x00000009)

public static final int KEY_UP

This constant is deprecated.
use KEY_UP instead

Constant Value: 38 (0x00000026)

public static final int MODIFIER_ALT

This constant is deprecated.
use isAltKeyDown() instead

Constant Value: 4 (0x00000004)

public static final int MODIFIER_CTRL

This constant is deprecated.
use isControlKeyDown() instead

Constant Value: 2 (0x00000002)

public static final int MODIFIER_META

This constant is deprecated.
use isMetaKeyDown() instead

Constant Value: 8 (0x00000008)

public static final int MODIFIER_SHIFT

This constant is deprecated.
use isShiftKeyDown() instead

Constant Value: 1 (0x00000001)

Public Methods

public abstract void onKeyDown (Widget sender, char keyCode, int modifiers)

This method is deprecated.
use onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent) instead

Fired when the user depresses a physical key.

Parameters
sender the widget that was focused when the event occurred.
keyCode the physical key that was depressed. Constants for this value are defined in this interface with the KEY prefix.
modifiers the modifier keys pressed at when the event occurred. This value is a combination of the bits defined by MODIFIER_SHIFT, MODIFIER_CTRL, and MODIFIER_ALT

public abstract void onKeyPress (Widget sender, char keyCode, int modifiers)

This method is deprecated.
use onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent) instead

Fired when a keyboard action generates a character. This occurs after onKeyDown and onKeyUp are fired for the physical key that was pressed.

It should be noted that many browsers do not generate keypress events for non-printing keyCode values, such as KEY_ENTER or arrow keys. These keyCodes can be reliably captured either with onKeyDown(Widget, char, int) or onKeyUp(Widget, char, int).

Parameters
sender the widget that was focused when the event occurred.
keyCode the Unicode character that was generated by the keyboard action.
modifiers the modifier keys pressed at when the event occurred. This value is a combination of the bits defined by MODIFIER_SHIFT, MODIFIER_CTRL, and MODIFIER_ALT

public abstract void onKeyUp (Widget sender, char keyCode, int modifiers)

This method is deprecated.
use onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent) instead

Fired when the user releases a physical key.

Parameters
sender the widget that was focused when the event occurred.
keyCode the physical key that was released. Constants for this value are defined in this interface with the KEY prefix.
modifiers the modifier keys pressed at when the event occurred. This value is a combination of the bits defined by MODIFIER_SHIFT, MODIFIER_CTRL, and MODIFIER_ALT