Platform_Input_KeyboardDevice Class Reference
[Platform]
Platform independent abstraction of a keyboard device.
More...

Public Types | |
| enum | KeyCode { KEY_INVALID = 0x00, KEY_CANCEL = 0x03, KEY_BACK = 0x08, KEY_TAB = 0x09, KEY_CLEAR = 0x0C, KEY_RETURN = 0x0D, KEY_SHIFT = 0x10, KEY_CONTROL = 0x11, KEY_MENU = 0x12, KEY_CAPITAL = 0x14, KEY_ESCAPE = 0x1B, KEY_SPACE = 0x20, KEY_PRIOR = 0x21, KEY_NEXT = 0x22, KEY_END = 0x23, KEY_HOME = 0x24, KEY_LEFT = 0x25, KEY_UP = 0x26, KEY_RIGHT = 0x27, KEY_DOWN = 0x28, KEY_SELECT = 0x29, KEY_EXEC = 0x2B, KEY_SNAPSHOT = 0x2C, KEY_HELP = 0x2F, KEY_0 = 0x30, KEY_1 = 0x31, KEY_2 = 0x32, KEY_3 = 0x33, KEY_4 = 0x34, KEY_5 = 0x35, KEY_6 = 0x36, KEY_7 = 0x37, KEY_8 = 0x38, KEY_9 = 0x39, KEY_A = 0x41, KEY_B = 0x42, KEY_C = 0x43, KEY_D = 0x44, KEY_E = 0x45, KEY_F = 0x46, KEY_G = 0x47, KEY_H = 0x48, KEY_I = 0x49, KEY_J = 0x4A, KEY_K = 0x4B, KEY_L = 0x4C, KEY_M = 0x4D, KEY_N = 0x4E, KEY_O = 0x4F, KEY_P = 0x50, KEY_Q = 0x51, KEY_R = 0x52, KEY_S = 0x53, KEY_T = 0x54, KEY_U = 0x55, KEY_V = 0x56, KEY_W = 0x57, KEY_X = 0x58, KEY_Y = 0x59, KEY_Z = 0x5A, KEY_LWIN = 0x5B, KEY_RWIN = 0x5C, KEY_APPS = 0x5D, KEY_NUMPAD0 = 0x60, KEY_NUMPAD1 = 0x61, KEY_NUMPAD2 = 0x62, KEY_NUMPAD3 = 0x63, KEY_NUMPAD4 = 0x64, KEY_NUMPAD5 = 0x65, KEY_NUMPAD6 = 0x66, KEY_NUMPAD7 = 0x67, KEY_NUMPAD8 = 0x68, KEY_NUMPAD9 = 0x69, KEY_MULTIPLY = 0x6A, KEY_ADD = 0x6B, KEY_SEPARATOR = 0x6C, KEY_SUBTRACT = 0x6D, KEY_DECIMAL = 0x6E, KEY_DIVIDE = 0x6F, KEY_F1 = 0x70, KEY_F2 = 0x71, KEY_F3 = 0x72, KEY_F4 = 0x73, KEY_F5 = 0x74, KEY_F6 = 0x75, KEY_F7 = 0x76, KEY_F8 = 0x77, KEY_F9 = 0x78, KEY_F10 = 0x79, KEY_F11 = 0x7A, KEY_F12 = 0x7B, KEY_LSHIFT = 0xA0, KEY_RSHIFT = 0xA1, KEY_LCONTROL = 0xA2, KEY_RCONTROL = 0xA3, KEY_LMENU = 0xA4, KEY_RMENU = 0xA5, KEY_ATTN = 0xF6, KEY_CRSEL = 0xF7, KEY_EXSEL = 0xF8, KEY_EREOF = 0xF9, KEY_PLAY = 0xFA, KEY_ZOOM = 0xFB, KEY_NONAME = 0xFC, KEY_PA1 = 0xFD, KEYCODE_COUNT = 0xFF } |
Public Member Functions | |
| virtual | ~Platform_Input_KeyboardDevice () |
| virtual bool | IsKeyDown (KeyCode keyCode) const =0 |
| virtual bool | IsCharDown (char ascii) const =0 |
| virtual void | ClearBufferedCharacters () const =0 |
| virtual int | GetBufferedCharacterCount () const =0 |
| virtual char | GetBufferedCharacter (int index) const =0 |
Detailed Description
Platform independent abstraction of a keyboard device.Provides basic access to the keyboard - both by keycode (which is used for the physical keyes) and characters (which takes into account things like upper-lower case, shift/alt modifiers etc).
- Todo:
- Documentation of the buffered input methods
Definition at line 24 of file Platform_Input_KeyboardDevice.h.
Member Enumeration Documentation
Enumeration of all keys that can be tested. Currently, this is based on the windows set of keys - it is up to each platform specific implementation to try and re-map the platforms keys as closely as possible to the ones specified here. This list can and will be expanded as needed, when more platforms are supported by the Pixie Game Engine.
- Enumerator:
Definition at line 78 of file Platform_Input_KeyboardDevice.h.
Constructor & Destructor Documentation
| virtual Platform_Input_KeyboardDevice::~Platform_Input_KeyboardDevice | ( | ) | [virtual] |
Destructor
Definition at line 30 of file Platform_Input_KeyboardDevice.h.
Member Function Documentation
| virtual bool Platform_Input_KeyboardDevice::IsKeyDown | ( | KeyCode | keyCode | ) | const [pure virtual] |
Checks if a key with the specified key code is currently held down See the KeyCode enum for more info on key codes.
- Returns:
- True if the specified key is held down, false if it isn't
- Parameters:
-
keyCode The key code for the key to check
Implemented in Platform_NULL_Input_KeyboardDevice, and Platform_Win32_Input_KeyboardDevice.
| virtual bool Platform_Input_KeyboardDevice::IsCharDown | ( | char | ascii | ) | const [pure virtual] |
Checks if the key, or combination of keys, representing the character with the specified ascii number is currently held down. Characters are different from keys, in that a combination of keys may be needed to produce certain characters, and in that key repeat effects may cause a character to be reported as alternately up and down, if held for a period of time.
- Returns:
- True if the character is held down, false if it isn't
- Parameters:
-
ascii Ascii code of the character to check
Implemented in Platform_NULL_Input_KeyboardDevice, and Platform_Win32_Input_KeyboardDevice.
| virtual void Platform_Input_KeyboardDevice::ClearBufferedCharacters | ( | ) | const [pure virtual] |
Implemented in Platform_NULL_Input_KeyboardDevice, and Platform_Win32_Input_KeyboardDevice.
| virtual int Platform_Input_KeyboardDevice::GetBufferedCharacterCount | ( | ) | const [pure virtual] |
Implemented in Platform_NULL_Input_KeyboardDevice, and Platform_Win32_Input_KeyboardDevice.
| virtual char Platform_Input_KeyboardDevice::GetBufferedCharacter | ( | int | index | ) | const [pure virtual] |
Implemented in Platform_NULL_Input_KeyboardDevice, and Platform_Win32_Input_KeyboardDevice.
Reproduction/republishing of any material on this site without permission is strictly prohibited.
