import { UIEventsCode } from "./UIEventsCode";
import { AndroidKeycode } from "./android";

export const KeyToCodeMap = new Map([
  [UIEventsCode.Backquote, AndroidKeycode.AKEYCODE_GRAVE],
  [UIEventsCode.Backslash, AndroidKeycode.AKEYCODE_BACKSLASH],
  [UIEventsCode.BracketLeft, AndroidKeycode.AKEYCODE_LEFT_BRACKET],
  [UIEventsCode.BracketRight, AndroidKeycode.AKEYCODE_RIGHT_BRACKET],
  [UIEventsCode.Comma, AndroidKeycode.AKEYCODE_COMMA],
  [UIEventsCode.Digit0, AndroidKeycode.AKEYCODE_0],
  [UIEventsCode.Digit1, AndroidKeycode.AKEYCODE_1],
  [UIEventsCode.Digit2, AndroidKeycode.AKEYCODE_2],
  [UIEventsCode.Digit3, AndroidKeycode.AKEYCODE_3],
  [UIEventsCode.Digit4, AndroidKeycode.AKEYCODE_4],
  [UIEventsCode.Digit5, AndroidKeycode.AKEYCODE_5],
  [UIEventsCode.Digit6, AndroidKeycode.AKEYCODE_6],
  [UIEventsCode.Digit7, AndroidKeycode.AKEYCODE_7],
  [UIEventsCode.Digit8, AndroidKeycode.AKEYCODE_8],
  [UIEventsCode.Digit9, AndroidKeycode.AKEYCODE_9],
  [UIEventsCode.Equal, AndroidKeycode.AKEYCODE_EQUALS],
  [UIEventsCode.IntlRo, AndroidKeycode.AKEYCODE_RO],
  [UIEventsCode.IntlYen, AndroidKeycode.AKEYCODE_YEN],
  [UIEventsCode.KeyA, AndroidKeycode.AKEYCODE_A],
  [UIEventsCode.KeyB, AndroidKeycode.AKEYCODE_B],
  [UIEventsCode.KeyC, AndroidKeycode.AKEYCODE_C],
  [UIEventsCode.KeyD, AndroidKeycode.AKEYCODE_D],
  [UIEventsCode.KeyE, AndroidKeycode.AKEYCODE_E],
  [UIEventsCode.KeyF, AndroidKeycode.AKEYCODE_F],
  [UIEventsCode.KeyG, AndroidKeycode.AKEYCODE_G],
  [UIEventsCode.KeyH, AndroidKeycode.AKEYCODE_H],
  [UIEventsCode.KeyI, AndroidKeycode.AKEYCODE_I],
  [UIEventsCode.KeyJ, AndroidKeycode.AKEYCODE_J],
  [UIEventsCode.KeyK, AndroidKeycode.AKEYCODE_K],
  [UIEventsCode.KeyL, AndroidKeycode.AKEYCODE_L],
  [UIEventsCode.KeyM, AndroidKeycode.AKEYCODE_M],
  [UIEventsCode.KeyN, AndroidKeycode.AKEYCODE_N],
  [UIEventsCode.KeyO, AndroidKeycode.AKEYCODE_O],
  [UIEventsCode.KeyP, AndroidKeycode.AKEYCODE_P],
  [UIEventsCode.KeyQ, AndroidKeycode.AKEYCODE_Q],
  [UIEventsCode.KeyR, AndroidKeycode.AKEYCODE_R],
  [UIEventsCode.KeyS, AndroidKeycode.AKEYCODE_S],
  [UIEventsCode.KeyT, AndroidKeycode.AKEYCODE_T],
  [UIEventsCode.KeyU, AndroidKeycode.AKEYCODE_U],
  [UIEventsCode.KeyV, AndroidKeycode.AKEYCODE_V],
  [UIEventsCode.KeyW, AndroidKeycode.AKEYCODE_W],
  [UIEventsCode.KeyX, AndroidKeycode.AKEYCODE_X],
  [UIEventsCode.KeyY, AndroidKeycode.AKEYCODE_Y],
  [UIEventsCode.KeyZ, AndroidKeycode.AKEYCODE_Z],
  [UIEventsCode.Minus, AndroidKeycode.AKEYCODE_MINUS],
  [UIEventsCode.Period, AndroidKeycode.AKEYCODE_PERIOD],
  [UIEventsCode.Quote, AndroidKeycode.AKEYCODE_APOSTROPHE],
  [UIEventsCode.Semicolon, AndroidKeycode.AKEYCODE_SEMICOLON],
  [UIEventsCode.Slash, AndroidKeycode.AKEYCODE_SLASH],
  [UIEventsCode.KanaMode, AndroidKeycode.AKEYCODE_KANA],
  [UIEventsCode.Delete, AndroidKeycode.AKEYCODE_FORWARD_DEL],
  [UIEventsCode.End, AndroidKeycode.AKEYCODE_MOVE_END],
  [UIEventsCode.Help, AndroidKeycode.AKEYCODE_HELP],
  [UIEventsCode.Home, AndroidKeycode.AKEYCODE_MOVE_HOME],
  [UIEventsCode.Insert, AndroidKeycode.AKEYCODE_INSERT],
  [UIEventsCode.PageDown, AndroidKeycode.AKEYCODE_PAGE_DOWN],
  [UIEventsCode.PageUp, AndroidKeycode.AKEYCODE_PAGE_UP],
  [UIEventsCode.AltLeft, AndroidKeycode.AKEYCODE_ALT_LEFT],
  [UIEventsCode.AltRight, AndroidKeycode.AKEYCODE_ALT_RIGHT],
  [UIEventsCode.Backspace, AndroidKeycode.AKEYCODE_DEL],
  [UIEventsCode.CapsLock, AndroidKeycode.AKEYCODE_CAPS_LOCK],
  [UIEventsCode.ControlLeft, AndroidKeycode.AKEYCODE_CTRL_LEFT],
  [UIEventsCode.ControlRight, AndroidKeycode.AKEYCODE_CTRL_RIGHT],
  [UIEventsCode.Enter, AndroidKeycode.AKEYCODE_ENTER],
  [UIEventsCode.MetaLeft, AndroidKeycode.AKEYCODE_META_LEFT],
  [UIEventsCode.MetaRight, AndroidKeycode.AKEYCODE_META_RIGHT],
  [UIEventsCode.ShiftLeft, AndroidKeycode.AKEYCODE_SHIFT_LEFT],
  [UIEventsCode.ShiftRight, AndroidKeycode.AKEYCODE_SHIFT_RIGHT],
  [UIEventsCode.Space, AndroidKeycode.AKEYCODE_SPACE],
  [UIEventsCode.Tab, AndroidKeycode.AKEYCODE_TAB],
  [UIEventsCode.ArrowLeft, AndroidKeycode.AKEYCODE_DPAD_LEFT],
  [UIEventsCode.ArrowUp, AndroidKeycode.AKEYCODE_DPAD_UP],
  [UIEventsCode.ArrowRight, AndroidKeycode.AKEYCODE_DPAD_RIGHT],
  [UIEventsCode.ArrowDown, AndroidKeycode.AKEYCODE_DPAD_DOWN],

  [UIEventsCode.NumLock, AndroidKeycode.AKEYCODE_NUM_LOCK],
  [UIEventsCode.Numpad0, AndroidKeycode.AKEYCODE_NUMPAD_0],
  [UIEventsCode.Numpad1, AndroidKeycode.AKEYCODE_NUMPAD_1],
  [UIEventsCode.Numpad2, AndroidKeycode.AKEYCODE_NUMPAD_2],
  [UIEventsCode.Numpad3, AndroidKeycode.AKEYCODE_NUMPAD_3],
  [UIEventsCode.Numpad4, AndroidKeycode.AKEYCODE_NUMPAD_4],
  [UIEventsCode.Numpad5, AndroidKeycode.AKEYCODE_NUMPAD_5],
  [UIEventsCode.Numpad6, AndroidKeycode.AKEYCODE_NUMPAD_6],
  [UIEventsCode.Numpad7, AndroidKeycode.AKEYCODE_NUMPAD_7],
  [UIEventsCode.Numpad8, AndroidKeycode.AKEYCODE_NUMPAD_8],
  [UIEventsCode.Numpad9, AndroidKeycode.AKEYCODE_NUMPAD_9],
  [UIEventsCode.NumpadAdd, AndroidKeycode.AKEYCODE_NUMPAD_ADD],
  [UIEventsCode.NumpadComma, AndroidKeycode.AKEYCODE_NUMPAD_COMMA],
  [UIEventsCode.NumpadDecimal, AndroidKeycode.AKEYCODE_NUMPAD_DOT],
  [UIEventsCode.NumpadDivide, AndroidKeycode.AKEYCODE_NUMPAD_DIVIDE],
  [UIEventsCode.NumpadEnter, AndroidKeycode.AKEYCODE_NUMPAD_ENTER],
  [UIEventsCode.NumpadEqual, AndroidKeycode.AKEYCODE_NUMPAD_EQUALS],
  [UIEventsCode.NumpadMultiply, AndroidKeycode.AKEYCODE_NUMPAD_MULTIPLY],
  [UIEventsCode.NumpadParenLeft, AndroidKeycode.AKEYCODE_NUMPAD_LEFT_PAREN],
  [UIEventsCode.NumpadParenRight, AndroidKeycode.AKEYCODE_NUMPAD_RIGHT_PAREN],
  [UIEventsCode.NumpadSubtract, AndroidKeycode.AKEYCODE_NUMPAD_SUBTRACT],

  [UIEventsCode.Escape, AndroidKeycode.AKEYCODE_ESCAPE],
  [UIEventsCode.F1, AndroidKeycode.AKEYCODE_F1],
  [UIEventsCode.F2, AndroidKeycode.AKEYCODE_F2],
  [UIEventsCode.F3, AndroidKeycode.AKEYCODE_F3],
  [UIEventsCode.F4, AndroidKeycode.AKEYCODE_F4],
  [UIEventsCode.F5, AndroidKeycode.AKEYCODE_F5],
  [UIEventsCode.F6, AndroidKeycode.AKEYCODE_F6],
  [UIEventsCode.F7, AndroidKeycode.AKEYCODE_F7],
  [UIEventsCode.F8, AndroidKeycode.AKEYCODE_F8],
  [UIEventsCode.F9, AndroidKeycode.AKEYCODE_F9],
  [UIEventsCode.F10, AndroidKeycode.AKEYCODE_F10],
  [UIEventsCode.F11, AndroidKeycode.AKEYCODE_F11],
  [UIEventsCode.F12, AndroidKeycode.AKEYCODE_F12],
  [UIEventsCode.Fn, AndroidKeycode.AKEYCODE_FUNCTION],
  [UIEventsCode.PrintScreen, AndroidKeycode.AKEYCODE_SYSRQ],
  [UIEventsCode.Pause, AndroidKeycode.AKEYCODE_BREAK],
]);
