#include <Win32DIKeyboard.h>
Inherits Keyboard.
Public Member Functions | |
| DirectInputKeyboard (void) | |
| virtual | ~DirectInputKeyboard (void) |
| virtual void | init (void) |
| initialize the keyboard, extending init functionality | |
| virtual void | reset (void) |
| Reset the keybaord system. | |
| virtual void | update (void) |
| update call, extending update functionality | |
| virtual Bool | getCapsState (void) |
| get state of caps lock key, return TRUE if down | |
Public Member Functions inherited from Keyboard | |
| Keyboard (void) | |
| virtual | ~Keyboard (void) |
| virtual void | createStreamMessages (void) |
| Bool | isShift () |
| Bool | isCtrl () |
| Bool | isAlt () |
| Int | getModifierFlags () |
| void | resetKeys (void) |
| reset the state of the keys | |
| KeyboardIO * | getFirstKey (void) |
| get first key ready for processing | |
| void | setKeyStatusData (UnsignedByte key, KeyboardIO::StatusType data) |
| set key status | |
| WideChar | translateKey (WideChar keyCode) |
| translte key code to printable UNICODE char | |
| WideChar | getPrintableKey (UnsignedByte key, Int state) |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | postProcessLoad () |
| virtual void | draw (void) |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Protected Member Functions | |
| virtual void | getKey (KeyboardIO *key) |
| get a single key event | |
| void | openKeyboard (void) |
| create direct input keyboard | |
| void | closeKeyboard (void) |
| release direct input keyboard | |
Protected Member Functions inherited from Keyboard | |
| void | initKeyNames (void) |
| initialize the key names table | |
| void | updateKeys (void) |
| update the state of our key data | |
| Bool | checkKeyRepeat (void) |
| check for repeating keys | |
| UnsignedByte | getKeyStatusData (UnsignedByte key) |
| get key status | |
| Bool | getKeyStateBit (UnsignedByte key, Int bit) |
| get key state bit | |
| UnsignedInt | getKeySequenceData (UnsignedByte key) |
| get key sequence | |
| void | setKeyStateData (UnsignedByte key, UnsignedByte data) |
| get key state | |
Protected Attributes | ||
| LPDIRECTINPUT8 | m_pDirectInput | |
| pointer to direct input interface | ||
| LPDIRECTINPUTDEVICE8 | m_pKeyboardDevice | |
| pointer to keyboard device | ||
Protected Attributes inherited from Keyboard | ||
| UnsignedShort | m_modifiers | |
| UnsignedByte | m_shift2Key | |
| KeyboardIO | m_keys [NUM_KEYS] | |
| the keys | ||
| KeyboardIO | m_keyStatus [NUM_KEYS] | |
| the key status flags | ||
| struct { | ||
| WideChar stdKey | ||
| WideChar shifted | ||
| WideChar shifted2 | ||
| } | m_keyNames [KEY_NAMES_COUNT] | |
| UnsignedInt | m_inputFrame | |
| frame input was gathered on | ||
Protected Attributes inherited from SubsystemInterface | ||
| AsciiString | m_name | |
Additional Inherited Members | |
Public Types inherited from Keyboard | |
| enum | { MAX_KEY_STATES = 3 } |
Protected Types inherited from Keyboard | |
| enum | { NUM_KEYS = 256 } |
| enum | { KEY_NAMES_COUNT = 256 } |
Class for interfacing with the keyboard using direct input as the implementation
Definition at line 70 of file Win32DIKeyboard.h.
| DirectInputKeyboard::DirectInputKeyboard | ( | void | ) |
Definition at line 341 of file Win32DIKeyboard.cpp.
|
virtual |
Definition at line 361 of file Win32DIKeyboard.cpp.
|
protected |
release direct input keyboard
close the direct input keyboard
Definition at line 217 of file Win32DIKeyboard.cpp.
|
virtual |
get state of caps lock key, return TRUE if down
Return TRUE if the caps lock key is down/hilighted
Implements Keyboard.
Definition at line 420 of file Win32DIKeyboard.cpp.
|
protectedvirtual |
get a single key event
Get a single keyboard event from direct input
Implements Keyboard.
Definition at line 245 of file Win32DIKeyboard.cpp.
|
virtual |
initialize the keyboard, extending init functionality
initialize the keyboard
Reimplemented from Keyboard.
Definition at line 372 of file Win32DIKeyboard.cpp.
|
protected |
create direct input keyboard
create our interface to the direct input keybard
Definition at line 115 of file Win32DIKeyboard.cpp.
|
virtual |
Reset the keybaord system.
Reset keyboard system
Reimplemented from Keyboard.
Definition at line 386 of file Win32DIKeyboard.cpp.
|
virtual |
update call, extending update functionality
called once per frame to update the keyboard state
Reimplemented from Keyboard.
Definition at line 397 of file Win32DIKeyboard.cpp.
|
protected |
pointer to direct input interface
Definition at line 96 of file Win32DIKeyboard.h.
|
protected |
pointer to keyboard device
Definition at line 97 of file Win32DIKeyboard.h.