Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csKeyboardDriver Class Reference

Generic Keyboard Driver.<. More...

#include <csinput.h>

Inheritance diagram for csKeyboardDriver:

csInputDriver iKeyboardDriver iBase List of all members.

Public Methods

 csKeyboardDriver (iObjectRegistry *)
 Initialize keyboard interface.

virtual ~csKeyboardDriver ()
 Destructor.

virtual void Reset ()
 Call to release all key down flags.

virtual void DoKey (int iKey, int iChar, bool iDown)
 Call this routine to add a key down/up event to queue.

virtual bool GetKeyState (int iKey)
 Query the state of a key. More...

virtual void LostFocus ()
 Application lost focus.


Public Attributes

 SCF_DECLARE_IBASE
csKeyboardDriver::eiEventHandler  scfiEventHandler

Protected Methods

virtual void SetKeyState (int iKey, bool iDown)
 Set key state. More...


Protected Attributes

csBitSet KeyState
 Key state array.


Friends

class  eiEventHandler

Detailed Description

Generic Keyboard Driver.<.

p> Keyboard driver should generate events and put them into an event queue. Also it tracks the current state of all keys.


Member Function Documentation

bool csKeyboardDriver::GetKeyState ( int iKey ) [virtual]
 

Query the state of a key.

All key codes in range 0..255, CSKEY_FIRST..CSKEY_LAST are supported. Returns true if the key is pressed, false if not.

Reimplemented from iKeyboardDriver.

void csKeyboardDriver::SetKeyState ( int iKey,
bool iDown ) [protected, virtual]
 

Set key state.

For example SetKey (CSKEY_UP, true). Called automatically by do_press and do_release.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000