Class: KeyEvent

olympe.ui.events. KeyEvent


new KeyEvent(key, char, ctrlKey, shiftKey, altKey, metaKey, eventTimeStamp)

Creates an instance of KeyEvent.

Parameters:
Name Type Description
key olympe.df.ONumber
char olympe.df.OString
ctrlKey olympe.df.OBoolean
shiftKey olympe.df.OBoolean
altKey olympe.df.OBoolean
metaKey olympe.df.OBoolean
eventTimeStamp olympe.df.ODateTime

Extends

Members


<static, constant> BACKSPACE :number

Backspace key ASCII code

Type:
  • number

<static, constant> CARRIAGE_RETURN :number

Carriage return key ASCII code

Type:
  • number

<static, constant> CTRL :number

CTRL key ASCII code

Type:
  • number

<static, constant> DELETE :number

Delete key ASCII code

Type:
  • number

<static, constant> DOWN :number

Down key ASCII code

Type:
  • number

<static, constant> ESCAPE :number

Escape key ASCII code

Type:
  • number

<static, constant> LEFT :number

Left key ASCII code

Type:
  • number

<static, constant> LINE_FEED :number

Line feed key ASCII code

Type:
  • number

<static, constant> META :number

Meta key ASCII code (windows / command key)

Type:
  • number

<static, constant> META2 :number

Meta key 2 ASCII code (right command key)

Type:
  • number

<static, constant> RIGHT :number

Right key ASCII code

Type:
  • number

<static, constant> SHIFT :number

Shift key ASCII code

Type:
  • number

<static, constant> TAB :number

Tab key ASCII code

Type:
  • number

<static, constant> UP :number

Up key ASCII code

Type:
  • number

<static, constant> Z :number

Z ASCII code

Type:
  • number

Methods


altKeyPressed()

Checks whether the Alt key was pressed.

Returns:

true if alt key was pressed

Type
olympe.df.POBoolean

ctrlKeyPressed()

Checks whether the 'Control' was pressed.

Returns:

true if ctrl key was pressed

Type
olympe.df.POBoolean

getEventTimestamp()

Gets the time stamp for that event, that is the date and time of its creation.

Inherited From:
Overrides:
Returns:

the creation date and time for this event

Type
olympe.df.PODateTime

getKeyChar()

Gets the character associated with the key code of that event. Returns an empty string if the key code doesn't match any printable character.

Returns:

Char of key pressed if printable, empty string otherwise

Type
olympe.df.POString

getKeyCode()

Gets the key code for that event.

Returns:

Key pressed

Type
olympe.df.PONumber

metaKeyPressed()

Checks whether the 'Meta' key was pressed.

Returns:

true if meta key was pressed (Apple Command key, Windows key, ...)

Type
olympe.df.POBoolean

shiftKeyPressed()

Checks whether the 'Shift' key was pressed.

Returns:

true if shift key was pressed

Type
olympe.df.POBoolean