CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csKeyEventHelper Class Reference
[Event handling]

Helper class to conveniently deal with keyboard events. More...

#include <csutil/event.h>

List of all members.

Static Public Member Functions

utf32_char GetRawCode (const iEvent *event)
 Retrieve the key's raw code.
utf32_char GetCookedCode (const iEvent *event)
 Retrieve the key's cooked code.
void GetModifiers (const iEvent *event, csKeyModifiers &modifiers)
 Retrieve the key's raw code.
csKeyEventType GetEventType (const iEvent *event)
 Retrieve the event type (key up or down.).
bool GetAutoRepeat (const iEvent *event)
 Retrieve whether a keyboard down event was caused by the initial press (not auto-repeat) or by having it held for a period of time (auto-repeat.).
csKeyCharType GetCharacterType (const iEvent *event)
 Retrieve the character type (dead or normal.).
bool GetEventData (const iEvent *event, csKeyEventData &data)
 Get all the information in one compact struct.
uint32 GetModifiersBits (const csKeyModifiers &modifiers)
 Get a bitmask corresponding to the pressed modifier keys from the keyboard modifiers struct.
uint32 GetModifiersBits (const iEvent *event)
 Get a bitmask corresponding to the pressed modifier keys from the event.
void GetModifiers (uint32 mask, csKeyModifiers &modifiers)
 Convert a bitmask returned by GetModifiersBits back to a csKeyModifiers struct.


Detailed Description

Helper class to conveniently deal with keyboard events.

Definition at line 39 of file event.h.


Member Function Documentation

bool csKeyEventHelper::GetAutoRepeat const iEvent event  )  [static]
 

Retrieve whether a keyboard down event was caused by the initial press (not auto-repeat) or by having it held for a period of time (auto-repeat.).

csKeyCharType csKeyEventHelper::GetCharacterType const iEvent event  )  [static]
 

Retrieve the character type (dead or normal.).

utf32_char csKeyEventHelper::GetCookedCode const iEvent event  )  [static]
 

Retrieve the key's cooked code.

bool csKeyEventHelper::GetEventData const iEvent event,
csKeyEventData data
[static]
 

Get all the information in one compact struct.

csKeyEventType csKeyEventHelper::GetEventType const iEvent event  )  [static]
 

Retrieve the event type (key up or down.).

void csKeyEventHelper::GetModifiers uint32  mask,
csKeyModifiers modifiers
[static]
 

Convert a bitmask returned by GetModifiersBits back to a csKeyModifiers struct.

Also works for the Modifiers members of the csEventMouseData and csEventJoystickData structs, if you cast them to uint32.

void csKeyEventHelper::GetModifiers const iEvent event,
csKeyModifiers modifiers
[static]
 

Retrieve the key's raw code.

uint32 csKeyEventHelper::GetModifiersBits const iEvent event  )  [static]
 

Get a bitmask corresponding to the pressed modifier keys from the event.

See also:
CSMASK_ALT etc.

uint32 csKeyEventHelper::GetModifiersBits const csKeyModifiers modifiers  )  [static]
 

Get a bitmask corresponding to the pressed modifier keys from the keyboard modifiers struct.

See also:
CSMASK_ALT etc.

utf32_char csKeyEventHelper::GetRawCode const iEvent event  )  [static]
 

Retrieve the key's raw code.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1