UNPKG

expo-key-event

Version:

Provides an interface for reading key events such as from external bluetooth keyboards on Android, iOS and Web.

114 lines (107 loc) 2.84 kB
export const KeyCodeMapping: Record<string, string> = { // --------------------------------------------------------------------------- // LETTERS (A–Z) // --------------------------------------------------------------------------- "4": "KeyA", "5": "KeyB", "6": "KeyC", "7": "KeyD", "8": "KeyE", "9": "KeyF", "10": "KeyG", "11": "KeyH", "12": "KeyI", "13": "KeyJ", "14": "KeyK", "15": "KeyL", "16": "KeyM", "17": "KeyN", "18": "KeyO", "19": "KeyP", "20": "KeyQ", "21": "KeyR", "22": "KeyS", "23": "KeyT", "24": "KeyU", "25": "KeyV", "26": "KeyW", "27": "KeyX", "28": "KeyY", "29": "KeyZ", // --------------------------------------------------------------------------- // DIGITS (TOP ROW) // --------------------------------------------------------------------------- "39": "Digit0", "30": "Digit1", "31": "Digit2", "32": "Digit3", "33": "Digit4", "34": "Digit5", "35": "Digit6", "36": "Digit7", "37": "Digit8", "38": "Digit9", // --------------------------------------------------------------------------- // WHITESPACE / NAVIGATION // --------------------------------------------------------------------------- "43": "Tab", "44": "Space", "40": "Enter", "42": "Backspace", "41": "Escape", "76": "Delete", "74": "Home", "77": "End", "75": "PageUp", "78": "PageDown", "73": "Insert", // --------------------------------------------------------------------------- // ARROW KEYS // --------------------------------------------------------------------------- "82": "ArrowUp", "81": "ArrowDown", "80": "ArrowLeft", "79": "ArrowRight", // --------------------------------------------------------------------------- // PUNCTUATION / SYMBOL KEYS // --------------------------------------------------------------------------- "54": "Comma", "55": "Period", "53": "Backquote", "45": "Minus", "46": "Equal", "47": "BracketLeft", "48": "BracketRight", "49": "Backslash", "51": "Semicolon", "52": "Quote", "56": "Slash", // --------------------------------------------------------------------------- // FUNCTION KEYS (F1–F12) // --------------------------------------------------------------------------- "58": "F1", "59": "F2", "60": "F3", "61": "F4", "62": "F5", "63": "F6", "64": "F7", "65": "F8", "66": "F9", "67": "F10", "68": "F11", "69": "F12", // --------------------------------------------------------------------------- // MODIFIER KEYS // --------------------------------------------------------------------------- "225": "ShiftLeft", "229": "ShiftRight", "226": "AltLeft", "230": "AltRight", "224": "ControlLeft", "228": "ControlRight", "57": "CapsLock", "71": "ScrollLock", "227": "MetaLeft", "231": "MetaRight", };