Input

ButtonKeys
up / down / left / rightarrows, WASD
aJ, Z, Space, Enter
bK, X
xU
yI

repeat(key, delay = 0.3, interval = 0.1), seconds. A tap between ticks still counts once in pressed.

On-screen controls

directions shows the pad. buttons lists a / b / x / y. Omit to show all. buttons: [] hides buttons, controls: false hides everything. Keyboard input is unaffected.

Standalone HTML

The third argument names the input source; releasing one source keeps another held.

Controller patterns

controls: {pattern: 'single'} shows a large J button in the bottom center without a directional pad. pattern: 'standard' uses the standard layout. A single-button layout can select a different action with buttons: ['b']; it requires exactly one button. Both sample pages and shared games use the declared pattern.