osb/source/application/StarInputEvent.cpp

167 lines
3.6 KiB
C++
Raw Normal View History

2023-06-20 04:33:09 +00:00
#include "StarInputEvent.hpp"
namespace Star {
EnumMap<Key> const KeyNames{
{Key::Backspace, "Backspace"},
{Key::Tab, "Tab"},
{Key::Clear, "Clear"},
{Key::Return, "Return"},
{Key::Escape, "Esc"},
{Key::Space, "Space"},
{Key::Exclaim, "!"},
{Key::QuotedBL, "\""},
{Key::Hash, "#"},
{Key::Dollar, "$"},
{Key::Ampersand, "&"},
{Key::Quote, "\'"},
{Key::LeftParen, "("},
{Key::RightParen, ")"},
{Key::Asterisk, "*"},
{Key::Plus, "+"},
{Key::Comma, ","},
{Key::Minus, "-"},
{Key::Period, "."},
{Key::Slash, "/"},
{Key::Zero, "0"},
{Key::One, "1"},
{Key::Two, "2"},
{Key::Three, "3"},
{Key::Four, "4"},
{Key::Five, "5"},
{Key::Six, "6"},
{Key::Seven, "7"},
{Key::Eight, "8"},
{Key::Nine, "9"},
{Key::Colon, ":"},
{Key::Semicolon, ";"},
{Key::Less, "<"},
{Key::Equals, "="},
{Key::Greater, ">"},
{Key::Question, "?"},
{Key::At, "@"},
{Key::LeftBracket, "["},
{Key::Backslash, "\\"},
{Key::RightBracket, "]"},
{Key::Caret, "^"},
{Key::Underscore, "_"},
{Key::Backquote, "`"},
{Key::A, "A"},
{Key::B, "B"},
{Key::C, "C"},
{Key::D, "D"},
{Key::E, "E"},
{Key::F, "F"},
{Key::G, "G"},
{Key::H, "H"},
{Key::I, "I"},
{Key::J, "J"},
{Key::K, "K"},
{Key::L, "L"},
{Key::M, "M"},
{Key::N, "N"},
{Key::O, "O"},
{Key::P, "P"},
{Key::Q, "Q"},
{Key::R, "R"},
{Key::S, "S"},
{Key::T, "T"},
{Key::U, "U"},
{Key::V, "V"},
{Key::W, "W"},
{Key::X, "X"},
{Key::Y, "Y"},
{Key::Z, "Z"},
{Key::Delete, "Del"},
{Key::Kp0, "Kp0"},
{Key::Kp1, "Kp1"},
{Key::Kp2, "Kp2"},
{Key::Kp3, "Kp3"},
{Key::Kp4, "Kp4"},
{Key::Kp5, "Kp5"},
{Key::Kp6, "Kp6"},
{Key::Kp7, "Kp7"},
{Key::Kp8, "Kp8"},
{Key::Kp9, "Kp9"},
{Key::Kp_period, "Kp_period"},
{Key::Kp_divide, "Kp_divide"},
{Key::Kp_multiply, "Kp_multiply"},
{Key::Kp_minus, "Kp_minus"},
{Key::Kp_plus, "Kp_plus"},
{Key::Kp_enter, "Kp_enter"},
{Key::Kp_equals, "Kp_equals"},
{Key::Up, "Up"},
{Key::Down, "Down"},
{Key::Right, "Right"},
{Key::Left, "Left"},
{Key::Insert, "Ins"},
{Key::Home, "Home"},
{Key::End, "End"},
{Key::PageUp, "PageUp"},
{Key::PageDown, "PageDown"},
{Key::F1, "F1"},
{Key::F2, "F2"},
{Key::F3, "F3"},
{Key::F4, "F4"},
{Key::F5, "F5"},
{Key::F6, "F6"},
{Key::F7, "F7"},
{Key::F8, "F8"},
{Key::F9, "F9"},
{Key::F10, "F10"},
{Key::F11, "F11"},
{Key::F12, "F12"},
{Key::F13, "F13"},
{Key::F14, "F14"},
{Key::F15, "F15"},
{Key::NumLock, "NumLock"},
{Key::CapsLock, "CapsLock"},
{Key::ScrollLock, "ScrollLock"},
{Key::RShift, "RShift"},
{Key::LShift, "LShift"},
{Key::RCtrl, "RCtrl"},
{Key::LCtrl, "LCtrl"},
{Key::RAlt, "RAlt"},
{Key::LAlt, "LAlt"},
{Key::RGui, "RGui"},
{Key::LGui, "LGui"},
{Key::AltGr, "AltGr"},
{Key::Compose, "Compose"},
{Key::Help, "Help"},
{Key::PrintScreen, "PrintScreen"},
{Key::SysReq, "SysReq"},
{Key::Pause, "Pause"},
{Key::Menu, "Menu"},
{Key::Power, "Power"}
};
EnumMap<KeyMod> const KeyModNames{
{KeyMod::NoMod, "NoMod"},
{KeyMod::LShift, "LShift"},
{KeyMod::RShift, "RShift"},
{KeyMod::LCtrl, "LCtrl"},
{KeyMod::RCtrl, "RCtrl"},
{KeyMod::LAlt, "LAlt"},
{KeyMod::RAlt, "RAlt"},
{KeyMod::LGui, "LMeta"},
{KeyMod::RGui, "RMeta"},
{KeyMod::Num, "Num"},
{KeyMod::Caps, "Caps"},
{KeyMod::AltGr, "AltGr"}
};
EnumMap<MouseButton> const MouseButtonNames{
{MouseButton::Left, "MouseLeft"},
{MouseButton::Middle, "MouseMiddle"},
{MouseButton::Right, "MouseRight"},
{MouseButton::FourthButton, "MouseFourth"},
{MouseButton::FifthButton, "MouseFifth"}
};
EnumMap<MouseWheel> const MouseWheelNames{
{MouseWheel::Up, "MouseWheelUp"},
{MouseWheel::Down, "MouseWheelDown"}
};
}