EHS/include/ehs/io/hid/Keyboard.h
Karutoh bcd71cf2b5
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 1m8s
Build & Release / Linux-AMD64-Build (push) Successful in 1m30s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m21s
Adjusted workflow.
2024-02-05 22:25:30 -08:00

122 lines
2.9 KiB
C++

#pragma once
#include "ehs/Types.h"
#include "Button.h"
#include "HID.h"
#define EHS_HID_KEYBOARD 0x02
namespace ehs
{
class 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() override;
Keyboard* Clone() const override;
static const Button Unknown;
static const Button Escape;
static const Button Backspace;
static const Button Enter;
static const Button LShift;
static const Button RShift;
static const Button LAlt;
static const Button RAlt;
static const Button LCtrl;
static const Button RCtrl;
static const Button Space;
static const Button A;
static const Button B;
static const Button C;
static const Button D;
static const Button E;
static const Button F;
static const Button G;
static const Button H;
static const Button I;
static const Button J;
static const Button K;
static const Button L;
static const Button M;
static const Button N;
static const Button O;
static const Button P;
static const Button Q;
static const Button R;
static const Button S;
static const Button T;
static const Button U;
static const Button V;
static const Button W;
static const Button X;
static const Button Y;
static const Button Z;
static const Button One;
static const Button Two;
static const Button Three;
static const Button Four;
static const Button Five;
static const Button Six;
static const Button Seven;
static const Button Eight;
static const Button Nine;
static const Button Zero;
static const Button Minus;
static const Button Equals;
static const Button Tilde;
static const Button BackSlash;
static const Button LeftSquareBracket;
static const Button RightSquareBracket;
static const Button SemiColon;
static const Button Apostrophe;
static const Button Comma;
static const Button Period;
static const Button ForwardSlash;
static const Button F1;
static const Button F2;
static const Button F3;
static const Button F4;
static const Button F5;
static const Button F6;
static const Button F7;
static const Button F8;
static const Button F9;
static const Button F10;
static const Button F11;
static const Button F12;
static const Button F13;
static const Button F14;
static const Button F15;
static const Button F16;
static const Button F17;
static const Button F18;
static const Button F19;
static const Button F20;
static const Button F21;
static const Button F22;
static const Button F23;
static const Button F24;
static const Button Left;
static const Button Right;
static const Button Up;
static const Button Down;
static Button TranslateScanCode(UInt_32 code);
static Char_8 TranslateToEnglish_8(bool shifted, const Button& button);
};
}