Skip to content

6b. Input ‐ buttons

CookieShade edited this page Jul 17, 2016 · 2 revisions

Input button names

Some of BETA.js' input handling functions have button parameters, and using them means knowing how to refer to a certain button on the keyboard. So, here are all the different buttons recognized by BETA.js listed!

Note: Button names are case-insensitive: "BackSpace" = "backspace"

Letter keys

"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"

Number keys

"Num0", "Num1", "Num2", "Num3", "Num4", "Num5", "Num6", "Num7", "Num8", "Num9"

Mouse buttons

"Mouse1", "Mouse2", "Mouse3", "Mouse4", "Mouse5"

Arrow keys

"Left", "Right", "Up", "Down"

Special keys

"Space", "Enter", "Shift", "Ctrl", "Alt", "Esc", "Tab", "BackSpace", "Del", "Insert", "CapsLock", "NumLock"

Function keys

"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"