csKeyboardDriver Class Reference
Generic Keyboard Driver. More...
#include <csutil/csinput.h>
Inheritance diagram for csKeyboardDriver:

Public Member Functions | |
virtual csPtr< iKeyComposer > | CreateKeyComposer () |
Return an instance of the keyboard composer. | |
csKeyboardDriver (iObjectRegistry *) | |
Initialize keyboard interface. | |
virtual void | DoKey (utf32_char codeRaw, utf32_char codeCooked, bool iDown, bool autoRepeat=false, csKeyCharType charType=csKeyCharTypeNormal) |
Call this routine to add a key down/up event to queue. | |
virtual bool | GetKeyState (utf32_char codeRaw) const |
Query the state of a key. | |
virtual uint32 | GetModifierState (utf32_char codeRaw) const |
Query the state of a modifier key. | |
virtual void | Reset () |
Call to release all key down flags. | |
virtual void | RestoreKeys () |
Call to get the key down flags in sync with the actual pressed keys. | |
virtual csEventError | SynthesizeCooked (iEvent *) |
Fills in the 'cooked' key code of an event with only a 'raw' key code. | |
virtual | ~csKeyboardDriver () |
Destructor. | |
Public Attributes | |
SCF_DECLARE_IBASE | |
Protected Member Functions | |
virtual void | GainFocus () |
virtual void | LostFocus () |
Application lost focus. | |
virtual void | SetKeyState (utf32_char codeRaw, bool iDown, bool autoRepeat) |
Set key state. | |
virtual void | SynthesizeCooked (utf32_char codeRaw, const csKeyModifiers &modifiers, utf32_char &codeCooked) |
Generates a 'cooked' key code for a 'raw' key code from some simple rules. | |
Protected Attributes | |
bool | keyDebug |
bool | keyDebugChecked |
csHash< bool, utf32_char > | keyStates |
Key state array. | |
csKeyModifiers | modifiersState |
csKeyboardDriver::eiEventHandler | scfiEventHandler |
iEventHandler implementation | |
Friends | |
struct | eiEventHandler |
Classes | |
struct | eiEventHandler |
iEventHandler implementation More... |
Detailed Description
Generic Keyboard Driver.Keyboard driver should generate events and put them into an event queue. Also it tracks the current state of all keys.
Definition at line 96 of file csinput.h.
Constructor & Destructor Documentation
|
Initialize keyboard interface.
|
|
Destructor.
|
Member Function Documentation
|
Return an instance of the keyboard composer.
Implements iKeyboardDriver. |
|
Call this routine to add a key down/up event to queue.
Implements iKeyboardDriver. |
|
Query the state of a key. All key codes are supported. Returns true if the key is pressed, false if not. Implements iKeyboardDriver. |
|
Query the state of a modifier key. Returns a bit field, where the nth bit is set if the nth modifier of a type is pressed. If a specific modifier is requested, e.g. CSKEY_SHIFT_LEFT, only the according bit is set. Otherwise, for a generic modifier (e.g. CSKEY_SHIFT), all distinct modifier keys of that type are represented. Example: Test if any Alt key is pressed: bool pressed = (KeyboardDriver->GetModifierState (CSKEY_ALT) != 0); bool pressed = (KeyboardDriver->GetModifierState (CSKEY_CTRL_RIGHT) != 0);
Implements iKeyboardDriver. |
|
Application lost focus.
Implements csInputDriver. Definition at line 123 of file csinput.h. References iKeyboardDriver::Reset(). |
|
Call to release all key down flags.
Implements iKeyboardDriver. |
|
Call to get the key down flags in sync with the actual pressed keys.
|
|
Set key state. For example SetKey (CSKEY_UP, true). Called automatically by do_press and do_release. |
|
Fills in the 'cooked' key code of an event with only a 'raw' key code.
Implements iKeyboardDriver. |
|
Generates a 'cooked' key code for a 'raw' key code from some simple rules.
|
Member Data Documentation
|
Key state array.
|
|
iEventHandler implementation
|
The documentation for this class was generated from the following file:
- csutil/csinput.h
Generated for Crystal Space by doxygen 1.4.4