|
OIS 1.6
Object-oriented Input System
|
#include <OISKeyboard.h>
Public Types | |
| enum | TextTranslationMode { Off , Unicode , Ascii } |
| TextTranslation Mode. More... | |
| enum | Modifier { Shift = 0x0000001 , LShift = 0x0000002 , RShift = 0x0000004 , Ctrl = 0x0000010 , LCtrl = 0x0000020 , RCtrl = 0x0000040 , Alt = 0x0000100 , LAlt = 0x0000200 , RAlt = 0x0000400 , CapsLock = 0x0001000 , NumLock = 0x0010000 , Win = 0x0100000 , LWin = 0x0200000 , RWin = 0x0400000 } |
| Enum of bit position of modifer. More... | |
Public Member Functions | |
| virtual | ~Keyboard () |
| virtual bool | isKeyDown (KeyCode key) const =0 |
| virtual void | setEventCallback (KeyListener *keyListener) |
| KeyListener * | getEventCallback () const |
| virtual void | setTextTranslation (TextTranslationMode mode) |
| TextTranslationMode | getTextTranslation () const |
| virtual const std::string & | getAsString (KeyCode kc)=0 |
| virtual OIS::KeyCode | getAsKeyCode (std::string str)=0 |
| bool | isModifierDown (Modifier mod) const |
| unsigned int | getModifiers () const |
| virtual void | copyKeyStates (char keys[256]) const =0 |
| Public Member Functions inherited from OIS::Object | |
| virtual | ~Object () |
| Type | type () const |
| const std::string & | vendor () const |
| virtual bool | buffered () const |
| InputManager * | getCreator () const |
| virtual void | setBuffered (bool buffered)=0 |
| virtual void | capture ()=0 |
| virtual int | getID () const |
| virtual Interface * | queryInterface (Interface::IType type)=0 |
| virtual void | _initialize ()=0 |
Protected Member Functions | |
| Keyboard (const std::string &vendor, bool buffered, int devID, InputManager *creator) | |
| Protected Member Functions inherited from OIS::Object | |
| Object (const std::string &vendor, Type iType, bool buffered, int devID, InputManager *creator) | |
Protected Attributes | |
| unsigned int | mModifiers |
| Bit field that holds status of Alt, Ctrl, Shift, Win, CapsLock, and NumLock as well as Left and Right variants. | |
| KeyListener * | mListener |
| Used for buffered/actionmapping callback. | |
| TextTranslationMode | mTextMode |
| The current translation mode. | |
| Protected Attributes inherited from OIS::Object | |
| std::string | mVendor |
| Vendor name if applicable/known. | |
| Type | mType |
| Type of controller object. | |
| bool | mBuffered |
| Buffered flag. | |
| int | mDevID |
| Not fully implemented yet. | |
| InputManager * | mCreator |
| The creator who created this object. | |
Keyboard base class. To be implemented by specific system (ie. DirectX Keyboard) This class is useful as you remain OS independent using this common interface.
|
inlinevirtual |
|
inlineprotected |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
| unsigned int Keyboard::getModifiers | ( | ) | const |
|
inline |
|
pure virtual |
| key | A KeyCode to check |
| bool Keyboard::isModifierDown | ( | Modifier | mod | ) | const |
|
inlinevirtual |
| keyListener | Send a pointer to a class derived from KeyListener or 0 to clear the callback |
|
virtual |
| mode | Off, Unicode, Ascii |
|
protected |
Used for buffered/actionmapping callback.
|
protected |
Bit field that holds status of Alt, Ctrl, Shift, Win, CapsLock, and NumLock as well as Left and Right variants.
|
protected |
The current translation mode.