|
|
|
@ -12,6 +12,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include "window.h"
|
|
|
|
#include "window.h"
|
|
|
|
#include <vector>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
|
|
|
|
namespace lunarium
|
|
|
|
namespace lunarium
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -221,6 +222,95 @@ namespace lunarium
|
|
|
|
KeyCode::MOUSE_X1_BUTTON,
|
|
|
|
KeyCode::MOUSE_X1_BUTTON,
|
|
|
|
KeyCode::MOUSE_X2_BUTTON
|
|
|
|
KeyCode::MOUSE_X2_BUTTON
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static std::map<std::string, KeyCode> KeyCodeMap =
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"A", KeyCode::A},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"B", KeyCode::B},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"C", KeyCode::C},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"D", KeyCode::D},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"E", KeyCode::E},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F", KeyCode::F},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"G", KeyCode::G},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"H", KeyCode::H},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"I", KeyCode::I},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"J", KeyCode::J},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"K", KeyCode::K},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"L", KeyCode::L},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"M", KeyCode::M},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"N", KeyCode::N},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"O", KeyCode::O},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"P", KeyCode::P},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"Q", KeyCode::Q},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"R", KeyCode::R},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"S", KeyCode::S},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"T", KeyCode::T},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"U", KeyCode::U},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"V", KeyCode::V},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"W", KeyCode::W},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"X", KeyCode::X},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"Y", KeyCode::Y},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"Z", KeyCode::Z},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_0", KeyCode::NUM_0},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_1", KeyCode::NUM_1},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_2", KeyCode::NUM_2},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_3", KeyCode::NUM_3},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_4", KeyCode::NUM_4},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_5", KeyCode::NUM_5},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_6", KeyCode::NUM_6},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_7", KeyCode::NUM_7},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_8", KeyCode::NUM_8},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"NUM_9", KeyCode::NUM_9},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F1", KeyCode::F1},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F2", KeyCode::F2},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F3", KeyCode::F3},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F4", KeyCode::F4},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F5", KeyCode::F5},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F6", KeyCode::F6},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F7", KeyCode::F7},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F8", KeyCode::F8},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F9", KeyCode::F9},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F10", KeyCode::F10},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F11", KeyCode::F11},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"F12", KeyCode::F12},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"LSHIFT", KeyCode::LSHIFT},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"RSHIFT", KeyCode::RSHIFT},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"LCONTROL", KeyCode::LCONTROL},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"RCONTROL", KeyCode::RCONTROL},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"LALT", KeyCode::LALT},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"RALT", KeyCode::RALT},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"SPACE", KeyCode::SPACE},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"LEFT", KeyCode::LEFT},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"UP", KeyCode::UP},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"RIGHT", KeyCode::RIGHT},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"DOWN", KeyCode::DOWN},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"DEL", KeyCode::DEL},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"RETURN", KeyCode::RETURN},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"BACKSPACE", KeyCode::BACKSPACE},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"TAB", KeyCode::TAB},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"ESCAPE", KeyCode::ESCAPE},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"PAGE_UP", KeyCode::PAGE_UP},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"PAGE_DOWN", KeyCode::PAGE_DOWN},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"SEMICOLON", KeyCode::SEMICOLON},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"EQUALS", KeyCode::EQUALS},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"COMMA", KeyCode::COMMA},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"DASH", KeyCode::DASH},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"DOT", KeyCode::DOT},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"FORWARD_SLASH", KeyCode::FORWARD_SLASH},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"TILDE", KeyCode::TILDE},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"OPEN_BRACKET", KeyCode::OPEN_BRACKET},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"BACKSLASH", KeyCode::BACKSLASH},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"CLOSE_BRACKET", KeyCode::CLOSE_BRACKET},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"QUOTE", KeyCode::QUOTE},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"MOUSE_LEFT_BUTTON", KeyCode::MOUSE_LEFT_BUTTON},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"MOUSE_RIGHT_BUTTON", KeyCode::MOUSE_RIGHT_BUTTON},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"MOUSE_MIDDLE_BUTTON", KeyCode::MOUSE_MIDDLE_BUTTON},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"MOUSE_X1_BUTTON", KeyCode::MOUSE_X1_BUTTON},
|
|
|
|
|
|
|
|
std::pair<std::string, KeyCode> {"MOUSE_X2_BUTTON", KeyCode::MOUSE_X2_BUTTON}
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|