![]() |
VR-Link API Documentation for HLA 1516
|
Instances of DtSimpleKeyboard are used to process keyboard input in a console application. More...
Collaboration diagram for DtSimpleKeyboard:Public Member Functions | |
| DtSimpleKeyboard () | |
| Constructor. More... | |
| virtual | ~DtSimpleKeyboard () |
| Destructor. More... | |
| virtual int | kbhit () |
| Returns 1 if keyboard input is ready; otherwise, 0. More... | |
| virtual int | keybrdTick () |
| Returns 0 if no key was pressed or if the key press was handled. More... | |
Protected Member Functions | |
| virtual int | getkey () |
| Return character from keyboard input, called in keybrdTick. More... | |
Private Attributes | |
| struct termios myInitialSettings | myNewSettings |
| int | myPeekCharacter |
Instances of DtSimpleKeyboard are used to process keyboard input in a console application.
Reads and processes one character commands. This default implementation handles the "q" or "Q" character and returns a value of -1 when "Q" key is pressed. Derivations of this class should overwrite keybrdTick and return 0 for any key press that has been processsed.
| DtSimpleKeyboard::DtSimpleKeyboard | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protectedvirtual |
Return character from keyboard input, called in keybrdTick.
|
virtual |
Returns 1 if keyboard input is ready; otherwise, 0.
|
virtual |
Returns 0 if no key was pressed or if the key press was handled.
Returns -1 if 'q' or 'Q' was pressed Otherwise returns int value of key pressed.
|
private |
|
private |