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.85 kB
export const KeyCodeMapping: Record<string, string> = { // --------------------------------------------------------------------------- // LETTERS (A–Z) // --------------------------------------------------------------------------- "29": "KeyA", "30": "KeyB", "31": "KeyC", "32": "KeyD", "33": "KeyE", "34": "KeyF", "35": "KeyG", "36": "KeyH", "37": "KeyI", "38": "KeyJ", "39": "KeyK", "40": "KeyL", "41": "KeyM", "42": "KeyN", "43": "KeyO", "44": "KeyP", "45": "KeyQ", "46": "KeyR", "47": "KeyS", "48": "KeyT", "49": "KeyU", "50": "KeyV", "51": "KeyW", "52": "KeyX", "53": "KeyY", "54": "KeyZ", // --------------------------------------------------------------------------- // DIGITS (TOP ROW) // --------------------------------------------------------------------------- "7": "Digit0", "8": "Digit1", "9": "Digit2", "10": "Digit3", "11": "Digit4", "12": "Digit5", "13": "Digit6", "14": "Digit7", "15": "Digit8", "16": "Digit9", // --------------------------------------------------------------------------- // WHITESPACE / NAVIGATION // --------------------------------------------------------------------------- "61": "Tab", "62": "Space", "66": "Enter", "67": "Backspace", "111": "Escape", "112": "Delete", "122": "Home", "123": "End", "92": "PageUp", "93": "PageDown", "124": "Insert", // --------------------------------------------------------------------------- // ARROW KEYS // --------------------------------------------------------------------------- "19": "ArrowUp", "20": "ArrowDown", "21": "ArrowLeft", "22": "ArrowRight", // --------------------------------------------------------------------------- // PUNCTUATION / SYMBOL KEYS // --------------------------------------------------------------------------- "55": "Comma", "56": "Period", "68": "Backquote", "69": "Minus", "70": "Equal", "71": "BracketLeft", "72": "BracketRight", "73": "Backslash", "74": "Semicolon", "75": "Quote", "76": "Slash", // --------------------------------------------------------------------------- // FUNCTION KEYS (F1–F12) // --------------------------------------------------------------------------- "131": "F1", "132": "F2", "133": "F3", "134": "F4", "135": "F5", "136": "F6", "137": "F7", "138": "F8", "139": "F9", "140": "F10", "141": "F11", "142": "F12", // --------------------------------------------------------------------------- // MODIFIER KEYS // --------------------------------------------------------------------------- "59": "ShiftLeft", "60": "ShiftRight", "57": "AltLeft", "58": "AltRight", "113": "ControlLeft", "114": "ControlRight", "115": "CapsLock", "116": "ScrollLock", "117": "MetaLeft", "118": "MetaRight", };