Drag[en]gine Script Module DragonScript Script API  1.0
KeyEvent Class Reference

Immutable keyboard event. More...

Inheritance diagram for KeyEvent:
ModifiableEvent Event

Public Member Functions

bool equalKeyEvents (KeyEvent event)
 Key events are equal. More...
 
int getButtonCode ()
 Device button code. More...
 
int getDevice ()
 Device index. More...
 
int getKeyChar ()
 Printable key character if existing. More...
 
int getKeyCode ()
 Key code. More...
 
KeyEvent new (Object source, int id, int keyCode, int modifiers, int device, int buttonCode)
 Create event. More...
 
KeyEvent new (Object source, int id, int keyCode, int modifiers, int keyChar, int device, int buttonCode)
 Create event. More...
 
- Public Member Functions inherited from ModifiableEvent
int getModifiers ()
 Modifier keys. More...
 
ModifiableEvent new (Object source, int id, int modifiers)
 Create event. More...
 
- Public Member Functions inherited from Event
int getIdentifier ()
 Event identifier. More...
 
Object getSource ()
 Event source. More...
 
Event new (Object source, int id)
 Create event. More...
 

Static Public Member Functions

static bool isKeyEvent (int identifier)
 Event identifier is a key event identifier. More...
 

Public Attributes

final int ID_KEY_PRESSED = 10
 
final int ID_KEY_RELEASED = 11
 
- Public Attributes inherited from ModifiableEvent
final int ALT = 0h4
 Alt key pressed. More...
 
final int CONTROL = 0h2
 Control key pressed. More...
 
final int SHIFT = 0h1
 Shift key pressed. More...
 

Detailed Description

Immutable keyboard event.

Stores the code of the key involved as well as the character it does represent if one exists.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

◆ equalKeyEvents()

bool equalKeyEvents ( KeyEvent  event)

Key events are equal.

Two key events equal if they have the same identifier and key code.

◆ getButtonCode()

int getButtonCode ( )

Device button code.

◆ getDevice()

int getDevice ( )

Device index.

◆ getKeyChar()

int getKeyChar ( )

Printable key character if existing.

◆ getKeyCode()

int getKeyCode ( )

Key code.

◆ isKeyEvent()

static bool isKeyEvent ( int  identifier)
static

Event identifier is a key event identifier.

◆ new() [1/2]

KeyEvent new ( Object  source,
int  id,
int  keyCode,
int  modifiers,
int  device,
int  buttonCode 
)

Create event.

◆ new() [2/2]

KeyEvent new ( Object  source,
int  id,
int  keyCode,
int  modifiers,
int  keyChar,
int  device,
int  buttonCode 
)

Create event.

Member Data Documentation

◆ ID_KEY_PRESSED

final int ID_KEY_PRESSED = 10

Key pressed event idenfitier

◆ ID_KEY_RELEASED

final int ID_KEY_RELEASED = 11

Key released event idenfitier


The documentation for this class was generated from the following file: