Skip to content
Reference > Classes

KeyEvent

Definition

KeyEvent var = .... ;

Extends

Extended By

None

Description

An event triggered by pressing a key.

Method Summary

Owner Name Return Type Description
KeyEvent getAltKeyDown() Boolean Returns true if alt key was pressed in a Key Event.
Object getClassName() String Returns the string name of this object's class type.
KeyEvent getCtrlKeyDown() Boolean Returns true if ctrl key was pressed in a Key Event.
KeyEvent getEventType() String Returns the type of event, either KEYUP, KEYDOWN, or KEYPRESS.
KeyEvent getJustAltKeyDown() Boolean Returns true if just the alt key was pressed in a Key Event.
KeyEvent getJustCtrlKeyDown() Boolean Returns true if just the ctrl key was pressed in a Key Event.
KeyEvent getJustShiftKeyDown() Boolean Returns true if just the shift key was pressed in a Key Event.
KeyEvent getKey() String Returns the key pressed.
KeyEvent getShiftKeyDown() Boolean Returns true if shift key was pressed in a Key Event.
KeyEvent getTargetField() FormField Returns the field that has focus at the time of this key event(or null if no field has focus).
KeyEvent getTargetPanel() Panel Returns the panel that has focus at the time of this key event.
Object toJson() String Returns a json representation of this object.

Method Definitions


getAltKeyDown()

Boolean KeyEvent::getAltKeyDown()

Description

Returns true if alt key was pressed in a Key Event.


getCtrlKeyDown()

Boolean KeyEvent::getCtrlKeyDown()

Description

Returns true if ctrl key was pressed in a Key Event.


getEventType()

String KeyEvent::getEventType()

Description

Returns the type of event, either KEYUP, KEYDOWN, or KEYPRESS.


getJustAltKeyDown()

Boolean KeyEvent::getJustAltKeyDown()

Description

Returns true if just the alt key was pressed in a Key Event.


getJustCtrlKeyDown()

Boolean KeyEvent::getJustCtrlKeyDown()

Description

Returns true if just the ctrl key was pressed in a Key Event.


getJustShiftKeyDown()

Boolean KeyEvent::getJustShiftKeyDown()

Description

Returns true if just the shift key was pressed in a Key Event.


getKey()

String KeyEvent::getKey()

Description

Returns the key pressed.


getShiftKeyDown()

Boolean KeyEvent::getShiftKeyDown()

Description

Returns true if shift key was pressed in a Key Event.


getTargetField()

FormField KeyEvent::getTargetField()

Description

Returns the field that has focus at the time of this key event(or null if no field has focus).


getTargetPanel()

Panel KeyEvent::getTargetPanel()

Description

Returns the panel that has focus at the time of this key event.