Simple interface to a keyboard. More...
#include <Devices/KeyBoard.H>
Public Member Functions | |
KeyBoard () | |
Constructor. | |
~KeyBoard () | |
Destructor. | |
KeyBoardKey | getKey (const bool block) |
Get a key from the keyboard. | |
int | getKeyAsChar (const bool block) |
get the key from the keybard and return as an int |
Simple interface to a keyboard.
This class provides basic methods to check whether a key was pressed on the keyboard. It is used by the Beobot, which has a small keypad with just 5 keys.
Definition at line 53 of file KeyBoard.H.
KeyBoard::KeyBoard | ( | ) |
KeyBoard::~KeyBoard | ( | ) |
Destructor.
Definition at line 65 of file KeyBoard.C.
KeyBoardKey KeyBoard::getKey | ( | const bool | block | ) |
Get a key from the keyboard.
block | if true, this function will block until a key is pressed. Otherwise, it will return the key pressed if any, or KBD_NONE if no key was pressed. |
Definition at line 86 of file KeyBoard.C.
References blocking.
Referenced by main().
int KeyBoard::getKeyAsChar | ( | const bool | block | ) |
get the key from the keybard and return as an int
block | if true, this function will block until a key is pressed. |
Definition at line 98 of file KeyBoard.C.
References blocking.