Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Araxeus/579783a5cf48bf421b47c93cf917063a to your computer and use it in GitHub Desktop.
Save Araxeus/579783a5cf48bf421b47c93cf917063a to your computer and use it in GitHub Desktop.
const virtualKeyCodes = {
ShiftLeft: "Shift",
ShiftRight: "Shift",
ControlLeft: "Ctrl",
ControlRight: "Ctrl",
AltLeft: "Alt",
AltRight: "Alt",
MetaLeft: "Super",
MetaRight: "Super",
NumLock: "NumLock",
NumpadDivide: "NumDiv",
NumpadMultiply: "NumMult",
NumpadSubtract: "NumSub",
NumpadAdd: "NumAdd",
NumpadDecimal: "NumDec ",
Numpad0: "Num0",
Numpad1: "Num1",
Numpad2: "Num2",
Numpad3: "Num3",
Numpad4: "Num4",
Numpad5: "Num5",
Numpad6: "Num6",
Numpad7: "Num7",
Numpad8: "Num8",
Numpad9: "Num9",
Digit0: "0",
Digit1: "1",
Digit2: "2",
Digit3: "3",
Digit4: "4",
Digit5: "5",
Digit6: "6",
Digit7: "7",
Digit8: "8",
Digit9: "9",
Minus: "-",
Equal: "=",
KeyQ: "Q",
KeyW: "W",
KeyE: "E",
KeyR: "R",
KeyT: "T",
KeyY: "Y",
KeyU: "U",
KeyI: "I",
KeyO: "O",
KeyP: "P",
KeyA: "A",
KeyS: "S",
KeyD: "D",
KeyF: "F",
KeyG: "G",
KeyH: "H",
KeyJ: "J",
KeyK: "K",
KeyL: "L",
KeyZ: "Z",
KeyX: "X",
KeyC: "C",
KeyV: "V",
KeyB: "B",
KeyN: "N",
KeyM: "M",
BracketLeft: "[",
BracketRight: "]",
Semicolon: ";",
Quote: "'",
Backquote: '"',
Backslash: "\\",
Comma: ",",
Period: "'.'",
Slash: "/",
plus: '+',
Space: "Space",
Tab: "Tab",
Backspace: "Backspace",
Delete: "Delete",
Insert: "Insert",
Return: "Return",
Enter: "Enter",
ArrowUp: "Up",
ArrowDown: "Down",
ArrowLeft: "Left",
ArrowRight: "Right",
Home: "Home",
End: "End",
PageUp: "PageUp",
PageDown: "PageDown",
Escape: "Escape",
AudioVolumeUp: "VolumeUp",
AudioVolumeDown: "VolumeDown",
AudioVolumeMute: "VolumeMute",
MediaTrackNext: "MediaNextTrack",
MediaTrackPrevious: "MediaPreviousTrack",
MediaStop: "MediaStop",
MediaPlayPause: "MediaPlayPause",
ScrollLock: "ScrollLock",
PrintScreen: "PrintScreen",
F1: "F1",
F2: "F2",
F3: "F3",
F4: "F4",
F5: "F5",
F6: "F6",
F7: "F7",
F8: "F8",
F9: "F9",
F10: "F10",
F11: "F11",
F12: "F12",
F13: "F13",
F14: "F14",
F15: "F15",
F16: "F16",
F17: "F17",
F18: "F18",
F19: "F19",
F20: "F20",
F21: "F21",
F22: "F22",
F23: "F23",
F24: "F24",
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment