122 lines
5.8 KiB
C++
122 lines
5.8 KiB
C++
#pragma once
|
|
|
|
#include "ehs/Types.h"
|
|
#include "Button.h"
|
|
#include "HID.h"
|
|
|
|
#define EHS_HID_KEYBOARD 0x02
|
|
|
|
namespace ehs
|
|
{
|
|
class EHS_LIB_IO Keyboard : public HID
|
|
{
|
|
public:
|
|
Keyboard();
|
|
|
|
Keyboard(Str_8 name, UInt_64 id);
|
|
|
|
Keyboard(Keyboard&& hid) noexcept = default;
|
|
|
|
Keyboard(const Keyboard& hid);
|
|
|
|
Keyboard& operator=(Keyboard&& hid) noexcept = default;
|
|
|
|
Keyboard& operator=(const Keyboard& hid);
|
|
|
|
void Poll(float delta) override;
|
|
|
|
Keyboard* Clone() const override;
|
|
|
|
static inline const Button Unknown = Button("Unknown");
|
|
static inline const Button Escape = Button("Escape Button");
|
|
static inline const Button Backspace = Button("Backspace Button");
|
|
static inline const Button Enter = Button("Enter Button");
|
|
static inline const Button LShift = Button("Left Shift Button");
|
|
static inline const Button RShift = Button("Right Shift Button");
|
|
static inline const Button LAlt = Button("Left Alt Button");
|
|
static inline const Button RAlt = Button("Right Alt Button");
|
|
static inline const Button LCtrl = Button("Left Control Button");
|
|
static inline const Button RCtrl = Button("Right Button");
|
|
static inline const Button Space = Button("Space Button");
|
|
static inline const Button A = Button("A Button");
|
|
static inline const Button B = Button("B Button");
|
|
static inline const Button C = Button("C Button");
|
|
static inline const Button D = Button("D Button");
|
|
static inline const Button E = Button("E Button");
|
|
static inline const Button F = Button("F Button");
|
|
static inline const Button G = Button("G Button");
|
|
static inline const Button H = Button("H Button");
|
|
static inline const Button I = Button("I Button");
|
|
static inline const Button J = Button("J Button");
|
|
static inline const Button K = Button("K Button");
|
|
static inline const Button L = Button("L Button");
|
|
static inline const Button M = Button("M Button");
|
|
static inline const Button N = Button("N Button");
|
|
static inline const Button O = Button("O Button");
|
|
static inline const Button P = Button("P Button");
|
|
static inline const Button Q = Button("Q Button");
|
|
static inline const Button R = Button("R Button");
|
|
static inline const Button S = Button("S Button");
|
|
static inline const Button T = Button("T Button");
|
|
static inline const Button U = Button("U Button");
|
|
static inline const Button V = Button("V Button");
|
|
static inline const Button W = Button("W Button");
|
|
static inline const Button X = Button("X Button");
|
|
static inline const Button Y = Button("Y Button");
|
|
static inline const Button Z = Button("Z Button");
|
|
static inline const Button One = Button("One Button");
|
|
static inline const Button Two = Button("Two Button");
|
|
static inline const Button Three = Button("Three Button");
|
|
static inline const Button Four = Button("Four Button");
|
|
static inline const Button Five = Button("Five Button");
|
|
static inline const Button Six = Button("Six Button");
|
|
static inline const Button Seven = Button("Seven Button");
|
|
static inline const Button Eight = Button("Eight Button");
|
|
static inline const Button Nine = Button("Nine Button");
|
|
static inline const Button Zero = Button("Zero Button");
|
|
static inline const Button Minus = Button("Minus Button");
|
|
static inline const Button Equals = Button("Equals Button");
|
|
static inline const Button Tilde = Button("Tilde Button");
|
|
static inline const Button BackSlash = Button("Back Slash Button");
|
|
static inline const Button LeftSquareBracket = Button("Left Square Bracket Button");
|
|
static inline const Button RightSquareBracket = Button("Right Square Bracket Button");
|
|
static inline const Button SemiColon = Button("Semi Colon Button");
|
|
static inline const Button Apostrophe = Button("Apostrophe Button");
|
|
static inline const Button Comma = Button("Comma Button");
|
|
static inline const Button Period = Button("Period Button");
|
|
static inline const Button ForwardSlash = Button("Forward Slash Button");
|
|
static inline const Button F1 = Button("Function One Button");
|
|
static inline const Button F2 = Button("Function Two Button");
|
|
static inline const Button F3 = Button("Function Three Button");
|
|
static inline const Button F4 = Button("Function Four Button");
|
|
static inline const Button F5 = Button("Function Five Button");
|
|
static inline const Button F6 = Button("Function Six Button");
|
|
static inline const Button F7 = Button("Function Seven Button");
|
|
static inline const Button F8 = Button("Function Eight Button");
|
|
static inline const Button F9 = Button("Function Nine Button");
|
|
static inline const Button F10 = Button("Function Ten Button");
|
|
static inline const Button F11 = Button("Function Eleven Button");
|
|
static inline const Button F12 = Button("Function Twelve Button");
|
|
static inline const Button F13 = Button("Function Thirteen Button");
|
|
static inline const Button F14 = Button("Function Fourteen Button");
|
|
static inline const Button F15 = Button("Function Fifteen Button");
|
|
static inline const Button F16 = Button("Function Sixteen Button");
|
|
static inline const Button F17 = Button("Function Seventeen Button");
|
|
static inline const Button F18 = Button("Function Eighteen Button");
|
|
static inline const Button F19 = Button("Function Nineteen Button");
|
|
static inline const Button F20 = Button("Function Twenty Button");
|
|
static inline const Button F21 = Button("Function Twenty One Button");
|
|
static inline const Button F22 = Button("Function Twenty Two Button");
|
|
static inline const Button F23 = Button("Function Twenty Three Button");
|
|
static inline const Button F24 = Button("Function Twenty Four Button");
|
|
static inline const Button Left = Button("Left Button");
|
|
static inline const Button Right = Button("Right Button");
|
|
static inline const Button Up = Button("Up Button");
|
|
static inline const Button Down = Button("Down Button");
|
|
|
|
static Button TranslateScanCode(UInt_32 code);
|
|
|
|
static Char_8 TranslateToEnglish_8(bool shifted, const Button& button);
|
|
};
|
|
}
|