Gel2D - The free/open source game creation suite

Public Member Functions
gel::GelKeyEvent Class Reference

Keyboard event. More...

#include <gelEvent.h>

Inheritance diagram for gel::GelKeyEvent:
gel::GelEvent

List of all members.

Public Member Functions

 GelKeyEvent (EventType tp, Key ky, int ch, KeyModifier modifiers)
 Constructor.
Key getKey () const
 Gets the key that triggered this event.
int getChar () const
 Gets the printable character generated by the key that triggered this event.
KeyModifier getModifiers () const
 Gets all modifier keys that were pressed.

Detailed Description

Keyboard event.


Constructor & Destructor Documentation

gel::GelKeyEvent::GelKeyEvent ( EventType  tp,
Key  ky,
int  ch,
KeyModifier  modifiers 
)

Constructor.

Parameters:
tp: The event type. Must be KeyPressed or KeyReleased.
ky: The key that was pressed.
ch: Unicode character that the key generated.
modifiers: Key modifiers.

Member Function Documentation

Key gel::GelKeyEvent::getKey ( ) const [inline]

Gets the key that triggered this event.

int gel::GelKeyEvent::getChar ( ) const [inline]

Gets the printable character generated by the key that triggered this event.

This function will return 0 if the key does not generate a printable character, (i.e. modifier keys like Shift, Control, etc.).

KeyModifier gel::GelKeyEvent::getModifiers ( ) const [inline]

Gets all modifier keys that were pressed.


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