#include <Win32KeyBoard.h>
Public Member Functions | |
| Win32Keyboard (InputManager *creator, IDirectInput8 *pDI, bool buffered, DWORD coopSettings) | |
| virtual | ~Win32Keyboard () |
| virtual bool | isKeyDown (KeyCode key) |
| virtual const std::string & | getAsString (KeyCode kc) |
| virtual void | copyKeyStates (char keys[256]) |
| virtual void | setBuffered (bool buffered) |
| virtual void | capture () |
| virtual Interface * | queryInterface (Interface::IType type) |
| virtual void | _initialize () |
Protected Member Functions | |
| Win32Keyboard () | |
| void | _readBuffered () |
| void | _read () |
| int | _translateText (KeyCode kc) |
| Internal method for translating KeyCodes to Text. | |
Protected Attributes | |
| IDirectInput8 * | mDirectInput |
| IDirectInputDevice8 * | mKeyboard |
| DWORD | coopSetting |
| unsigned char | KeyBuffer [256] |
| WCHAR | deadKey |
| Stored dead key from last translation. | |
| std::string | mGetString |
| used for getAsString | |
Definition at line 31 of file Win32KeyBoard.h.
| Win32Keyboard::Win32Keyboard | ( | InputManager * | creator, | |
| IDirectInput8 * | pDI, | |||
| bool | buffered, | |||
| DWORD | coopSettings | |||
| ) |
| pDI | Valid DirectInput8 Interface | |
| buffered | True for buffered input mode | |
| coopSettings | A combination of DI Flags (see DX Help for info on input device settings) |
Definition at line 32 of file Win32KeyBoard.cpp.
References coopSetting, deadKey, KeyBuffer, OIS::Keyboard::listener, OIS::Object::mBuffered, OIS::Object::mCreator, mDirectInput, mKeyboard, OIS::Object::mType, and OISKeyboard.
| Win32Keyboard::~Win32Keyboard | ( | ) | [virtual] |
| OIS::Win32Keyboard::Win32Keyboard | ( | ) | [inline, protected] |
Definition at line 68 of file Win32KeyBoard.h.
| bool Win32Keyboard::isKeyDown | ( | KeyCode | key | ) | [virtual] |
| key | A KeyCode to check |
Implements OIS::Keyboard.
Definition at line 246 of file Win32KeyBoard.cpp.
References KeyBuffer.
Referenced by _read().
| const std::string & Win32Keyboard::getAsString | ( | KeyCode | kc | ) | [virtual] |
| kc | KeyCode to convert |
Implements OIS::Keyboard.
Definition at line 252 of file Win32KeyBoard.cpp.
References mGetString, and mKeyboard.
| void Win32Keyboard::copyKeyStates | ( | char | keys[256] | ) | [virtual] |
Implements OIS::Keyboard.
Definition at line 275 of file Win32KeyBoard.cpp.
References KeyBuffer.
| void Win32Keyboard::setBuffered | ( | bool | buffered | ) | [virtual] |
Implements OIS::Object.
Definition at line 282 of file Win32KeyBoard.cpp.
References _initialize(), OIS::Object::mBuffered, and mKeyboard.
| void Win32Keyboard::capture | ( | ) | [virtual] |
Implements OIS::Object.
Definition at line 94 of file Win32KeyBoard.cpp.
References _read(), _readBuffered(), and OIS::Object::mBuffered.
| virtual Interface* OIS::Win32Keyboard::queryInterface | ( | Interface::IType | type | ) | [inline, virtual] |
| type | The type of interface you are looking for |
Implements OIS::Object.
Definition at line 63 of file Win32KeyBoard.h.
| void Win32Keyboard::_initialize | ( | ) | [virtual] |
Implements OIS::Object.
Definition at line 48 of file Win32KeyBoard.cpp.
References coopSetting, deadKey, KEYBOARD_DX_BUFFERSIZE, OIS::Object::mBuffered, OIS::Object::mCreator, mDirectInput, mKeyboard, OIS::Keyboard::mModifiers, and OIS_EXCEPT.
Referenced by setBuffered().
| void Win32Keyboard::_readBuffered | ( | ) | [protected] |
Definition at line 103 of file Win32KeyBoard.cpp.
References _translateText(), OIS::Keyboard::Alt, OIS::Keyboard::Ctrl, OIS::KC_LCONTROL, OIS::KC_LMENU, OIS::KC_LSHIFT, OIS::KC_RCONTROL, OIS::KC_RMENU, OIS::KC_RSHIFT, KEYBOARD_DX_BUFFERSIZE, KeyBuffer, OIS::KeyListener::keyPressed(), OIS::KeyListener::keyReleased(), OIS::Keyboard::listener, mKeyboard, OIS::Keyboard::mModifiers, OIS_EXCEPT, and OIS::Keyboard::Shift.
Referenced by capture().
| void Win32Keyboard::_read | ( | ) | [protected] |
Definition at line 166 of file Win32KeyBoard.cpp.
References OIS::Keyboard::Alt, OIS::Keyboard::Ctrl, isKeyDown(), OIS::KC_LCONTROL, OIS::KC_LMENU, OIS::KC_LSHIFT, OIS::KC_RCONTROL, OIS::KC_RMENU, OIS::KC_RSHIFT, KeyBuffer, mKeyboard, OIS::Keyboard::mModifiers, and OIS::Keyboard::Shift.
Referenced by capture().
| int Win32Keyboard::_translateText | ( | KeyCode | kc | ) | [protected] |
Internal method for translating KeyCodes to Text.
Definition at line 188 of file Win32KeyBoard.cpp.
References deadKey, OIS::Keyboard::mTextMode, and OIS::Keyboard::Off.
Referenced by _readBuffered().
IDirectInput8* OIS::Win32Keyboard::mDirectInput [protected] |
IDirectInputDevice8* OIS::Win32Keyboard::mKeyboard [protected] |
Definition at line 74 of file Win32KeyBoard.h.
Referenced by _initialize(), _read(), _readBuffered(), getAsString(), setBuffered(), Win32Keyboard(), and ~Win32Keyboard().
DWORD OIS::Win32Keyboard::coopSetting [protected] |
unsigned char OIS::Win32Keyboard::KeyBuffer[256] [protected] |
Definition at line 77 of file Win32KeyBoard.h.
Referenced by _read(), _readBuffered(), copyKeyStates(), isKeyDown(), and Win32Keyboard().
WCHAR OIS::Win32Keyboard::deadKey [protected] |
Stored dead key from last translation.
Definition at line 83 of file Win32KeyBoard.h.
Referenced by _initialize(), _translateText(), and Win32Keyboard().
std::string OIS::Win32Keyboard::mGetString [protected] |
1.5.4