The keyboard device, this is the keyboard manager.
More...
#include <ceKeyboard.h>
List of all members.
Public Member Functions |
virtual int | IsKeyPressed (const unsigned char key=0x0) const =0 |
| Check whether a key is pressed, at any given time.
|
virtual int | IsKeyReleased (const unsigned char key=0x0) const =0 |
| Check whether a key is released, at any given time.
|
virtual int | MapVirtualKey (const unsigned char key, int map_type=KEYMAP_SCANCODE) const =0 |
| Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.
|
virtual int | GetKeyboardState (int buffer[256]) const =0 |
| Copies the status of the 256 virtual keys to the specified buffer.
|
virtual void | SetKeyboardEvent (IKeyboardEvent *Event)=0 |
| Set the keyboard event.
|
virtual IKeyboardEvent * | GetKeyboardEvent (void)=0 |
| Retrieves the keyboard event.
|
virtual EInputDevice | GetDeviceType (void) const =0 |
| Retrieves the device type.
|
virtual char * | GetDeviceName (void) const =0 |
| Retrieves the device name.
|
virtual int | GetDeviceCount (void) const =0 |
| Retrieves the device count.
|
virtual int | IsDevicePresent (const int id=0x0) const =0 |
| Check whether a device is present, at any given time.
|
virtual void | Update (const int async=TRUE)=0 |
| Update status of only this device.
|
Detailed Description
The keyboard device, this is the keyboard manager.
- See also:
- IKeyboardEvent
- Todo:
- Methods:
- AttachKeyboardEvent(IKeyboardEvent *Event) : short(index)
- DetachKeyboardEvent(IKeyboardEvent *Event)
- GetKeyboardEvent(const short index)
Member Function Documentation
virtual int IsKeyPressed |
( |
const unsigned char |
key = 0x0 |
) |
const [pure virtual] |
Check whether a key is pressed, at any given time.
- Parameters:
-
| key | Specifies a virtual key. If the desired virtual key is a letter or digit (A through Z, a through z, or 0 through 9), key must be set to the ASCII value of that character. For other keys, it must be a virtual-key code. |
- Returns:
- If the key is pressed, the return is a TRUE value or if the key is released, the return is a FALSE value.
- See also:
- IsKeyReleased
-
ceKeyCodes.h
virtual int IsKeyReleased |
( |
const unsigned char |
key = 0x0 |
) |
const [pure virtual] |
Check whether a key is released, at any given time.
- Parameters:
-
| key | Specifies a virtual key. If the desired virtual key is a letter or digit (A through Z, a through z, or 0 through 9), key must be set to the ASCII value of that character. For other keys, it must be a virtual-key code. |
- Returns:
- If the key is released, the return is a TRUE value or if the key is pressed, the return is a FALSE value.
- See also:
- IsKeyPressed
-
ceKeyCodes.h
virtual int MapVirtualKey |
( |
const unsigned char |
key, |
|
|
int |
map_type = KEYMAP_SCANCODE | |
|
) |
| | const [pure virtual] |
Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.
- Parameters:
-
| key | Specifies the virtual-key code or scan code for a key. How this value is interpreted depends on the value of the map_type parameter. |
| map_type | Specifies the translation to perform. The value of this parameter depends on the value of the key parameter. (Default: KEYMAP_SCANCODE) |
- Returns:
- The return value is either a scan code, a virtual-key code, or a character value, depending on the value of key and map_type. If there is no translation, the return value is zero.
- See also:
- ceKeyCodes.h
virtual int GetKeyboardState |
( |
int |
buffer[256] |
) |
const [pure virtual] |
Copies the status of the 256 virtual keys to the specified buffer.
- Parameters:
-
| buffer | The 256-byte array that receives the status data for each virtual key. |
- Returns:
- If this succeeds, the return is a TRUE value or if this fails, the return is a FALSE value.
- See also:
- ceKeyCodes.h
virtual void SetKeyboardEvent |
( |
IKeyboardEvent * |
Event |
) |
[pure virtual] |
Set the keyboard event.
- Parameters:
-
| Event | Pointer to keyboard event. |
Retrieves the keyboard event.
- Returns:
- The keyboard event.
virtual EInputDevice GetDeviceType |
( |
void |
|
) |
const [pure virtual, inherited] |
Retrieves the device type.
- Returns:
- The device type.
virtual char* GetDeviceName |
( |
void |
|
) |
const [pure virtual, inherited] |
Retrieves the device name.
- Returns:
- The device name.
virtual int GetDeviceCount |
( |
void |
|
) |
const [pure virtual, inherited] |
Retrieves the device count.
- Returns:
- The number of devices attached.
virtual int IsDevicePresent |
( |
const int |
id = 0x0 |
) |
const [pure virtual, inherited] |
Check whether a device is present, at any given time.
- Returns:
- If this succeeds, the return is a TRUE value or if this fails, the return is a FALSE value.
virtual void Update |
( |
const int |
async = TRUE |
) |
[pure virtual, inherited] |
Update status of only this device.
- Parameters:
-
| async | Ignore this parameter. |
The documentation for this class was generated from the following file:
|
|
 |
|