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.
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.