Skip to content

Commit

Permalink
Missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoquesada committed Nov 11, 2023
1 parent 4bb3706 commit cb000a2
Showing 1 changed file with 231 additions and 0 deletions.
231 changes: 231 additions & 0 deletions src/components/bluepad32_arduino/include/ArduinoKeyboardConstants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
// Copyright 2021 - 2023, Ricardo Quesada, http://retro.moe
// SPDX-License-Identifier: Apache-2.0 or LGPL-2.1-or-later

#ifndef BP32_ARDUINO_KEYBOARD_CONSTANTS_H
#define BP32_ARDUINO_KEYBOARD_CONSTANTS_H

#include <stdint.h>

#include "hid_usage.h"
#include "uni_keyboard.h"

enum KeyboardKey : uint8_t {
Keyboard_A = HID_USAGE_KB_A,
Keyboard_B = HID_USAGE_KB_B,
Keyboard_C = HID_USAGE_KB_C,
Keyboard_D = HID_USAGE_KB_D,
Keyboard_E = HID_USAGE_KB_E,
Keyboard_F = HID_USAGE_KB_F,
Keyboard_G = HID_USAGE_KB_G,
Keyboard_H = HID_USAGE_KB_H,
Keyboard_I = HID_USAGE_KB_I,
Keyboard_J = HID_USAGE_KB_J,
Keyboard_K = HID_USAGE_KB_K,
Keyboard_L = HID_USAGE_KB_L,
Keyboard_M = HID_USAGE_KB_M,
Keyboard_N = HID_USAGE_KB_N,
Keyboard_O = HID_USAGE_KB_O,
Keyboard_P = HID_USAGE_KB_P,
Keyboard_Q = HID_USAGE_KB_Q,
Keyboard_R = HID_USAGE_KB_R,
Keyboard_S = HID_USAGE_KB_S,
Keyboard_T = HID_USAGE_KB_T,
Keyboard_U = HID_USAGE_KB_U,
Keyboard_V = HID_USAGE_KB_V,
Keyboard_W = HID_USAGE_KB_W,
Keyboard_X = HID_USAGE_KB_X,
Keyboard_Y = HID_USAGE_KB_Y,
Keyboard_Z = HID_USAGE_KB_Z,
Keyboard_1 = HID_USAGE_KB_1_EXCLAMATION_MARK,
Keyboard_2 = HID_USAGE_KB_2_AT,
Keyboard_3 = HID_USAGE_KB_3_NUMBER_SIGN,
Keyboard_4 = HID_USAGE_KB_4_DOLLAR,
Keyboard_5 = HID_USAGE_KB_5_PERCENT,
Keyboard_6 = HID_USAGE_KB_6_CARET,
Keyboard_7 = HID_USAGE_KB_7_AMPERSAND,
Keyboard_8 = HID_USAGE_KB_8_ASTERISK,
Keyboard_9 = HID_USAGE_KB_9_OPARENTHESIS,
Keyboard_0 = HID_USAGE_KB_0_CPARENTHESIS,
Keyboard_Enter = HID_USAGE_KB_ENTER,
Keyboard_Escape = HID_USAGE_KB_ESCAPE,
Keyboard_Backspace = HID_USAGE_KB_BACKSPACE,
Keyboard_Tab = HID_USAGE_KB_TAB,
Keyboard_Spacebar = HID_USAGE_KB_SPACEBAR,
Keyboard_Underscore = HID_USAGE_KB_MINUS_UNDERSCORE,
Keyboard_Equal = HID_USAGE_KB_EQUAL_PLUS,
Keyboard_OpenBracket = HID_USAGE_KB_OBRACKET_OBRACE,
Keyboard_CloseBracket = HID_USAGE_KB_CBRACKET_CBRACE,
Keyboard_Backslash = HID_USAGE_KB_BACKSLASH_VERTICAL_BAR,
Keyboard_Tilde = HID_USAGE_KB_NONUS_NUMBER_SIGN_TILDE,
Keyboard_SemiColon = HID_USAGE_KB_SEMICOLON_COLON,
Keyboard_Quote = HID_USAGE_KB_SINGLE_DOUBLE_QUOTE,
Keyboard_GraveAccent = HID_USAGE_KB_GRAVE_ACCENT_TILDE,
Keyboard_Comma = HID_USAGE_KB_COMMA_LESS,
Keyboard_Dot = HID_USAGE_KB_DOT_GREATER,
Keyboard_Slash = HID_USAGE_KB_SLASH_QUESTION,
Keyboard_CapsLock = HID_USAGE_KB_CAPS_LOCK,
Keyboard_F1 = HID_USAGE_KB_F1,
Keyboard_F2 = HID_USAGE_KB_F2,
Keyboard_F3 = HID_USAGE_KB_F3,
Keyboard_F4 = HID_USAGE_KB_F4,
Keyboard_F5 = HID_USAGE_KB_F5,
Keyboard_F6 = HID_USAGE_KB_F6,
Keyboard_F7 = HID_USAGE_KB_F7,
Keyboard_F8 = HID_USAGE_KB_F8,
Keyboard_F9 = HID_USAGE_KB_F9,
Keyboard_F10 = HID_USAGE_KB_F10,
Keyboard_F11 = HID_USAGE_KB_F11,
Keyboard_F12 = HID_USAGE_KB_F12,
Keyboard_PrintScreen = HID_USAGE_KB_PRINT_SCREEN,
Keyboard_ScrollLock = HID_USAGE_KB_SCROLL_LOCK,
Keyboard_Pause = HID_USAGE_KB_PAUSE,
Keyboard_Insert = HID_USAGE_KB_INSERT,
Keyboard_Home = HID_USAGE_KB_HOME,
Keyboard_PageUp = HID_USAGE_KB_PAGE_UP,
Keyboard_Delete = HID_USAGE_KB_DELETE,
Keyboard_End = HID_USAGE_KB_END,
Keyboard_PageDown = HID_USAGE_KB_PAGE_DOWN,
Keyboard_RightArrow = HID_USAGE_KB_RIGHT_ARROW,
Keyboard_LeftArrow = HID_USAGE_KB_LEFT_ARROW,
Keyboard_DownArrow = HID_USAGE_KB_DOWN_ARROW,
Keyboard_UpArrow = HID_USAGE_KB_UP_ARROW,
Keypad_NumLock = HID_USAGE_KP_NUM_LOCK_CLEAR,
Keypad_Slash = HID_USAGE_KP_SLASH,
Keypad_Asterisk = HID_USAGE_KP_ASTERISK,
Keypad_Minus = HID_USAGE_KP_MINUS,
Keypad_Plus = HID_USAGE_KP_PLUS,
Keypad_Enter = HID_USAGE_KP_ENTER,
Keypad_1 = HID_USAGE_KP_1_END,
Keypad_2 = HID_USAGE_KP_2_DOWN_ARROW,
Keypad_3 = HID_USAGE_KP_3_PAGEDN,
Keypad_4 = HID_USAGE_KP_4_LEFT_ARROW,
Keypad_5 = HID_USAGE_KP_5,
Keypad_6 = HID_USAGE_KP_6_RIGHT_ARROW,
Keypad_7 = HID_USAGE_KP_7_HOME,
Keypad_8 = HID_USAGE_KP_8_UP_ARROW,
Keypad_9 = HID_USAGE_KP_9_PAGEUP,
Keypad_0 = HID_USAGE_KP_0_INSERT,
Keypad_Dot = HID_USAGE_KP_DOT_DELETE,
Keyboard_BackSlash = HID_USAGE_KB_NONUS_BACK_SLASH_VERTICAL_BAR,
Keyboard_Application = HID_USAGE_KB_APPLICATION,
Keyboard_Power = HID_USAGE_KB_POWER,
Keypad_Equal = HID_USAGE_KP_EQUAL,
Keyboard_F13 = HID_USAGE_KB_F13,
Keyboard_F14 = HID_USAGE_KB_F14,
Keyboard_F15 = HID_USAGE_KB_F15,
Keyboard_F16 = HID_USAGE_KB_F16,
Keyboard_F17 = HID_USAGE_KB_F17,
Keyboard_F18 = HID_USAGE_KB_F18,
Keyboard_F19 = HID_USAGE_KB_F19,
Keyboard_F20 = HID_USAGE_KB_F20,
Keyboard_F21 = HID_USAGE_KB_F21,
Keyboard_F22 = HID_USAGE_KB_F22,
Keyboard_F23 = HID_USAGE_KB_F23,
Keyboard_F24 = HID_USAGE_KB_F24,
Keyboard_Execute = HID_USAGE_KB_EXECUTE,
Keyboard_Help = HID_USAGE_KB_HELP,
Keyboard_Menu = HID_USAGE_KB_MENU,
Keyboard_Select = HID_USAGE_KB_SELECT,
Keyboard_Stop = HID_USAGE_KB_STOP,
Keyboard_Again = HID_USAGE_KB_AGAIN,
Keyboard_Undo = HID_USAGE_KB_UNDO,
Keyboard_Cut = HID_USAGE_KB_CUT,
Keyboard_Copy = HID_USAGE_KB_COPY,
Keyboard_Paste = HID_USAGE_KB_PASTE,
Keyboard_Find = HID_USAGE_KB_FIND,
Keyboard_Mute = HID_USAGE_KB_MUTE,
Keyboard_VolumeUp = HID_USAGE_KB_VOLUME_UP,
Keyboard_VolumeDown = HID_USAGE_KB_VOLUME_DOWN,
Keyboard_LockingCapsLock = HID_USAGE_KB_LOCKING_CAPS_LOCK,
Keyboard_LockingNumLock = HID_USAGE_KB_LOCKING_NUM_LOCK,
Keyboard_LockingScrollLock = HID_USAGE_KB_LOCKING_SCROLL_LOCK,
Keypad_Comma = HID_USAGE_KP_COMMA,
Keypad_EqualSign = HID_USAGE_KP_EQUAL_SIGN,
Keyboard_International1 = HID_USAGE_KB_INTERNATIONAL1,
Keyboard_International2 = HID_USAGE_KB_INTERNATIONAL2,
Keyboard_International3 = HID_USAGE_KB_INTERNATIONAL3,
Keyboard_International4 = HID_USAGE_KB_INTERNATIONAL4,
Keyboard_International5 = HID_USAGE_KB_INTERNATIONAL5,
Keyboard_International6 = HID_USAGE_KB_INTERNATIONAL6,
Keyboard_International7 = HID_USAGE_KB_INTERNATIONAL7,
Keyboard_International8 = HID_USAGE_KB_INTERNATIONAL8,
Keyboard_International9 = HID_USAGE_KB_INTERNATIONAL9,
Keyboard_Lang1 = HID_USAGE_KB_LANG1,
Keyboard_Lang2 = HID_USAGE_KB_LANG2,
Keyboard_Lang3 = HID_USAGE_KB_LANG3,
Keyboard_Lang4 = HID_USAGE_KB_LANG4,
Keyboard_Lang5 = HID_USAGE_KB_LANG5,
Keyboard_Lang6 = HID_USAGE_KB_LANG6,
Keyboard_Lang7 = HID_USAGE_KB_LANG7,
Keyboard_Lang8 = HID_USAGE_KB_LANG8,
Keyboard_Lang9 = HID_USAGE_KB_LANG9,
Keyboard_AltErase = HID_USAGE_KB_ALTERNATE_ERASE,
Keyboard_Sysreq = HID_USAGE_KB_SYSREQ,
Keyboard_Cancel = HID_USAGE_KB_CANCEL,
Keyboard_Clear = HID_USAGE_KB_CLEAR,
Keyboard_Prior = HID_USAGE_KB_PRIOR,
Keyboard_Return = HID_USAGE_KB_RETURN,
Keyboard_Separator = HID_USAGE_KB_SEPARATOR,
Keyboard_Out = HID_USAGE_KB_OUT,
Keyboard_Oper = HID_USAGE_KB_OPER,
Keyboard_ClearAgain = HID_USAGE_KB_CLEAR_AGAIN,
Keyboard_CrSel = HID_USAGE_KB_CRSEL,
Keyboard_ExSel = HID_USAGE_KB_EXSEL,
Keypad_00 = HID_USAGE_KP_00,
Keypad_000 = HID_USAGE_KP_000,
Keyboard_ThousandsSeparator = HID_USAGE_KB_THOUSANDS_SEPARATOR,
Keyboard_DecimalSeparator = HID_USAGE_KB_DECIMAL_SEPARATOR,
Keyboard_CurrentyUnit = HID_USAGE_KB_CURRENCY_UNIT,
Keyboard_CurrencySubUnit = HID_USAGE_KB_CURRENCY_SUB_UNIT,
Keypad_OpenParenthesis = HID_USAGE_KP_OPARENTHESIS,
Keypad_CloseParenthesis = HID_USAGE_KP_CPARENTHESIS,
Keypad_OpenBrace = HID_USAGE_KP_OBRACE,
Keypad_CloseBrace = HID_USAGE_KP_CBRACE,
Keypad_Tab = HID_USAGE_KP_TAB,
Keypad_Backspace = HID_USAGE_KP_BACKSPACE,
Keypad_A = HID_USAGE_KP_A,
Keypad_B = HID_USAGE_KP_B,
Keypad_C = HID_USAGE_KP_C,
Keypad_D = HID_USAGE_KP_D,
Keypad_E = HID_USAGE_KP_E,
Keypad_F = HID_USAGE_KP_F,
Keypad_Xor = HID_USAGE_KP_XOR,
Keypad_Caret = HID_USAGE_KP_CARET,
Keypad_Percent = HID_USAGE_KP_PERCENT,
Keypad_Less = HID_USAGE_KP_LESS,
Keypad_Greater = HID_USAGE_KP_GREATER,
Keypad_Ampersand = HID_USAGE_KP_AMPERSAND,
Keypad_LogicalAnd = HID_USAGE_KP_LOGICAL_AND,
Keypad_VerticalBar = HID_USAGE_KP_VERTICAL_BAR,
Keypad_LogicalOr = HID_USAGE_KP_LOGIACL_OR,
Keypad_Colon = HID_USAGE_KP_COLON,
Keypad_NumberSign = HID_USAGE_KP_NUMBER_SIGN,
Keypad_Space = HID_USAGE_KP_SPACE,
Keypad_At = HID_USAGE_KP_AT,
Keypad_ExclamationMark = HID_USAGE_KP_EXCLAMATION_MARK,
Keypad_MemoryStore = HID_USAGE_KP_MEMORY_STORE,
Keypad_MemoryRecall = HID_USAGE_KP_MEMORY_RECALL,
Keypad_MemoryClear = HID_USAGE_KP_MEMORY_CLEAR,
Keypad_MemoryAdd = HID_USAGE_KP_MEMORY_ADD,
Keypad_MemorySubtract = HID_USAGE_KP_MEMORY_SUBTRACT,
Keypad_MemoryMultiply = HID_USAGE_KP_MEMORY_MULTIPLY,
Keypad_MemoryDivide = HID_USAGE_KP_MEMORY_DIVIDE,
Keypad_PlusMinus = HID_USAGE_KP_PLUSMINUS,
Keypad_Clear = HID_USAGE_KP_CLEAR,
Keypad_ClearEntry = HID_USAGE_KP_CLEAR_ENTRY,
Keypad_Binary = HID_USAGE_KP_BINARY,
Keypad_Octal = HID_USAGE_KP_OCTAL,
Keypad_Decimal = HID_USAGE_KP_DECIMAL,
Keypad_Hexadecimal = HID_USAGE_KP_HEXADECIMAL,

Keyboard_LeftControl = HID_USAGE_KB_LEFT_CONTROL,
Keyboard_LeftShift = HID_USAGE_KB_LEFT_SHIFT,
Keyboard_LeftAlt = HID_USAGE_KB_LEFT_ALT,
Keyboard_LeftMeta = HID_USAGE_KB_LEFT_GUI,
Keyboard_RightControl = HID_USAGE_KB_RIGHT_CONTROL,
Keyboard_RightShift = HID_USAGE_KB_RIGHT_SHIFT,
Keyboard_RightAlt = HID_USAGE_KB_RIGHT_ALT,
Keyboard_RightMeta = HID_USAGE_KB_RIGHT_GUI,
};

#endif // BP32_ARDUINO_KEYBOARD_CONSTANTS_H

0 comments on commit cb000a2

Please sign in to comment.