Class hierarchy   Compound list   File list   Compound Members   File Members  

Keyboard Class Reference

This class gives a representation of the system keyboard. More...

Inherits SystemInterface.

List of all members.

Public Members

Related Functions

(Note that these are not member functions.)

Detailed Description

This class gives a representation of the system keyboard.

It also provides two methods of access, but these may be combined. The polling is good for games that need to know if a certain key is pressed NOW. The event is good for applications need to get any key press/release information for input of text for example.


Member Function Documentation

virtual long Keyboard::update() = 0 [pure virtual]

This must be called for polling (using the [] operator).

virtual int Keyboard::operator[](int ID) = 0 [pure virtual]

Get the current press state of a certain key.

virtual int Keyboard::press(int ID) = 0 [pure virtual]

Get the current press state of a certain key.

virtual int Keyboard::constPress(int ID) = 0 [pure virtual]

Check if this key was pressed last time update was called.

virtual int Keyboard::getKey(int& ID, int& Pressed) = 0 [pure virtual]

Get a key event.

Returns 1 if key was pressed or released, Modifys "ID" & "Pressed" accordingly.

virtual void Keyboard::setLeds(int NumLock, int CapsLock, int ScrollLock) = 0 [pure virtual]

Sets the state of the keyboard leds.

Doesn't work yet.

char DLLExport getKeyChar(int Key, int Shift=0)

Translate key ID into the character they represent on the keyboard.


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