MPMA Framework 0.4
Namespaces | Functions | Variables
Keyboard.h File Reference

Keyboard input. Note that all input relies on the window being set up first. More...

Go to the source code of this file.

Namespaces

namespace  INPUT
 

Input.


namespace  INPUT::KEYBOARD
 

Keyboard-specific input.


Functions

const std::string & INPUT::KEYBOARD::GetFriendlyName (uint8 key)
 Returns the friendly name for a key value.
const std::string & INPUT::KEYBOARD::GetPersistentIdentifier (uint8 key)
 Returns an string that can be used to uniquely identify the key again after the program has exited.
uint8 INPUT::KEYBOARD::FindKey (const std::string &persistentIdentifier)
 Finds a key given a persistent identifier. Returns 0 if not found;.
bool INPUT::KEYBOARD::IsKeyDown (uint8 key)
 Returns whether the specified key is currently down.
const std::vector< uint8 > & INPUT::KEYBOARD::GetCurrentlyPressedKeys ()
 Returns a list of keys that are currently pressed down.
const std::vector< uint8 > & INPUT::KEYBOARD::GetNewlyPressedKeys ()
 Returns a list of keys that were newly pressed within the last frame.
bool INPUT::KEYBOARD::UpdateTypedText (std::string &textToEdit)
 Updates a string with text typed by the user. If the user had pressed backspace, the last character is removed. Enter is also stored in the string as
. Returns true if the text was changed.
void INPUT::KEYBOARD::SetCaptureMode (bool captureTypedText, bool captureKeyState)
 Sets the capture mode for keyboard input. This controls whether typed text or key state is captured and made available to the app. By default both are captured.
bool INPUT::KEYBOARD::IsCapturingText ()
 Returns whether typed text is currently being captured.
bool INPUT::KEYBOARD::IsCapturingState ()
 Returns whether key state is currently being captured.

Variables

const uint8 INPUT::KEYBOARD::A = 'A'
 A key.
const uint8 INPUT::KEYBOARD::B = 'B'
 B key.
const uint8 INPUT::KEYBOARD::C = 'C'
 C key.
const uint8 INPUT::KEYBOARD::D = 'D'
 D key.
const uint8 INPUT::KEYBOARD::E = 'E'
 E key.
const uint8 INPUT::KEYBOARD::F = 'F'
 F key.
const uint8 INPUT::KEYBOARD::G = 'G'
 G key.
const uint8 INPUT::KEYBOARD::H = 'H'
 H key.
const uint8 INPUT::KEYBOARD::I = 'I'
 I key.
const uint8 INPUT::KEYBOARD::J = 'J'
 J key.
const uint8 INPUT::KEYBOARD::K = 'K'
 K key.
const uint8 INPUT::KEYBOARD::L = 'L'
 L key.
const uint8 INPUT::KEYBOARD::M = 'M'
 M key.
const uint8 INPUT::KEYBOARD::N = 'N'
 N key.
const uint8 INPUT::KEYBOARD::O = 'O'
 O key.
const uint8 INPUT::KEYBOARD::P = 'P'
 P key.
const uint8 INPUT::KEYBOARD::Q = 'Q'
 Q key.
const uint8 INPUT::KEYBOARD::R = 'R'
 R key.
const uint8 INPUT::KEYBOARD::S = 'S'
 S key.
const uint8 INPUT::KEYBOARD::T = 'T'
 T key.
const uint8 INPUT::KEYBOARD::U = 'U'
 U key.
const uint8 INPUT::KEYBOARD::V = 'V'
 V key.
const uint8 INPUT::KEYBOARD::W = 'W'
 W key.
const uint8 INPUT::KEYBOARD::X = 'X'
 X key.
const uint8 INPUT::KEYBOARD::Y = 'Y'
 Y key.
const uint8 INPUT::KEYBOARD::Z = 'Z'
 Z key.
const uint8 INPUT::KEYBOARD::NUM0 = '0'
 0 key above the letters
const uint8 INPUT::KEYBOARD::NUM1 = '1'
 1 key above the letters
const uint8 INPUT::KEYBOARD::NUM2 = '2'
 2 key above the letters
const uint8 INPUT::KEYBOARD::NUM3 = '3'
 3 key above the letters
const uint8 INPUT::KEYBOARD::NUM4 = '4'
 4 key above the letters
const uint8 INPUT::KEYBOARD::NUM5 = '5'
 5 key above the letters
const uint8 INPUT::KEYBOARD::NUM6 = '6'
 6 key above the letters
const uint8 INPUT::KEYBOARD::NUM7 = '7'
 7 key above the letters
const uint8 INPUT::KEYBOARD::NUM8 = '8'
 8 key above the letters
const uint8 INPUT::KEYBOARD::NUM9 = '9'
 9 key above the letters
const uint8 INPUT::KEYBOARD::SPACE = ' '
 space key
const uint8 INPUT::KEYBOARD::TILDA = '`'
 ~ key
const uint8 INPUT::KEYBOARD::LEFT_BRACKET = '['
 [ key
const uint8 INPUT::KEYBOARD::RIGHT_BRACKET = ']'
 ] key
const uint8 INPUT::KEYBOARD::QUOTE = '\''
 " key
const uint8 INPUT::KEYBOARD::COMMA = ','
 , key
const uint8 INPUT::KEYBOARD::PERIOD = '.'
 . key
const uint8 INPUT::KEYBOARD::SLASH = '/'
 / key
const uint8 INPUT::KEYBOARD::BACKSLASH = '\\'
 \ key
const uint8 INPUT::KEYBOARD::EQUALS = '='
 = key
const uint8 INPUT::KEYBOARD::DASH = '-'
const uint8 INPUT::KEYBOARD::COLON = ';'
 ; key
const uint8 INPUT::KEYBOARD::ENTER = '\n'
 enter key
const uint8 INPUT::KEYBOARD::TAB = '\t'
 tab key
const uint8 INPUT::KEYBOARD::BACKSPACE = 130
 backspace key
const uint8 INPUT::KEYBOARD::ESCAPE = 131
 escape key
const uint8 INPUT::KEYBOARD::UP = 140
 up arrow key
const uint8 INPUT::KEYBOARD::DOWN = 141
 down arrow key
const uint8 INPUT::KEYBOARD::LEFT = 142
 left arrow key
const uint8 INPUT::KEYBOARD::RIGHT = 143
 right arrow key
const uint8 INPUT::KEYBOARD::INSERT = 150
 insert key
const uint8 INPUT::KEYBOARD::DELETE = 151
 delete key
const uint8 INPUT::KEYBOARD::HOME = 152
 home key
const uint8 INPUT::KEYBOARD::END = 153
 end key
const uint8 INPUT::KEYBOARD::PAGE_UP = 154
 page up key
const uint8 INPUT::KEYBOARD::PAGE_DOWN = 155
 page down key
const uint8 INPUT::KEYBOARD::F1 = 161
 F1 function key.
const uint8 INPUT::KEYBOARD::F2 = 162
 F2 function key.
const uint8 INPUT::KEYBOARD::F3 = 163
 F3 function key.
const uint8 INPUT::KEYBOARD::F4 = 164
 F4 function key.
const uint8 INPUT::KEYBOARD::F5 = 165
 F5 function key.
const uint8 INPUT::KEYBOARD::F6 = 166
 F6 function key.
const uint8 INPUT::KEYBOARD::F7 = 167
 F7 function key.
const uint8 INPUT::KEYBOARD::F8 = 168
 F8 function key.
const uint8 INPUT::KEYBOARD::F9 = 169
 F9 function key.
const uint8 INPUT::KEYBOARD::F10 = 170
 F10 function key.
const uint8 INPUT::KEYBOARD::F11 = 171
 F11 function key.
const uint8 INPUT::KEYBOARD::F12 = 172
 F12 function key.
const uint8 INPUT::KEYBOARD::PAD0 = 200
 0 key on numpad
const uint8 INPUT::KEYBOARD::PAD1 = 201
 1 key on numpad
const uint8 INPUT::KEYBOARD::PAD2 = 202
 2 key on numpad
const uint8 INPUT::KEYBOARD::PAD3 = 203
 3 key on numpad
const uint8 INPUT::KEYBOARD::PAD4 = 204
 4 key on numpad
const uint8 INPUT::KEYBOARD::PAD5 = 205
 5 key on numpad
const uint8 INPUT::KEYBOARD::PAD6 = 206
 6 key on numpad
const uint8 INPUT::KEYBOARD::PAD7 = 207
 7 key on numpad
const uint8 INPUT::KEYBOARD::PAD8 = 208
 8 key on numpad
const uint8 INPUT::KEYBOARD::PAD9 = 209
 9 key on numpad
const uint8 INPUT::KEYBOARD::PAD_SLASH = 210
 / key on numpad
const uint8 INPUT::KEYBOARD::PAD_STAR = 211
 * key on numpad
const uint8 INPUT::KEYBOARD::PAD_MINUS = 212
const uint8 INPUT::KEYBOARD::PAD_PLUS = 213
 + key on numpad
const uint8 INPUT::KEYBOARD::PAD_DOT = 214
 . key on numpad
const uint8 INPUT::KEYBOARD::PAD_ENTER = 215
 enter key on numpad
const uint8 INPUT::KEYBOARD::LEFT_SHIFT = 230
 left shift key
const uint8 INPUT::KEYBOARD::RIGHT_SHIFT = 231
 right shift key
const uint8 INPUT::KEYBOARD::LEFT_CONTROL = 232
 left control key
const uint8 INPUT::KEYBOARD::RIGHT_CONTROL = 233
 right control key
const uint8 INPUT::KEYBOARD::LEFT_ALT = 234
 left alt key - BE WARY that the desktop system may already make use of this key for other purposes
const uint8 INPUT::KEYBOARD::RIGHT_ALT = 235
 right alt key - BE WARY that the desktop system may already make use of this key for other purposes

Detailed Description

Keyboard input. Note that all input relies on the window being set up first.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends