Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

KeyCode

KeyCode = `Key${Letter}` | `Digit${Digit}` | `Numpad${Digit}` | `F${FunctionNumber}` | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "Space" | "Enter" | "Tab" | "Escape" | "Backspace" | "Delete" | "Insert" | "Home" | "End" | "PageUp" | "PageDown" | "ShiftLeft" | "ShiftRight" | "ControlLeft" | "ControlRight" | "AltLeft" | "AltRight" | "CapsLock" | "Backquote" | "Minus" | "Equal" | "BracketLeft" | "BracketRight" | "Backslash" | "Semicolon" | "Quote" | "Comma" | "Period" | "Slash" | "NumpadAdd" | "NumpadSubtract" | "NumpadMultiply" | "NumpadDivide" | "NumpadDecimal" | "NumpadEnter" | "NumpadEqual" | "NumpadComma" | "NumLock" | "ScrollLock" | "PrintScreen" | "Pause" | "ContextMenu" | "IntlBackslash" | "IntlRo" | "IntlYen" | "KanaMode" | "Lang1" | "Lang2" | "Convert" | "NonConvert"

A key by its KeyboardEvent.code, such as "KeyF", "Digit1", "ShiftLeft" or "Space": the key’s place on the keyboard, whatever letter the player’s layout prints on it. Every code of the standard keyboard but ⌘ and the Windows key, MetaLeft and MetaRight, which let go of every held key, since macOS sends no release under them.