You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(input): a key pressed and released between two ticks is never seen #519
The keyboard state is a plain held/not-held map: keydown sets inputs[code] = true and keyup sets it back to false (input-handler.ts#L96-L102). Systems only read it through getKeyStatus, once per tick.
So a key pressed and released between two ticks (a quick tap, or any tap when the tick rate is low or the tab was throttled) is never seen by any system. There is also no "just pressed" state: every example game that reacts to one press (pong and breakout menus, flappy-bird's flap, tic-tac-toe, the scene switch in basics/scenes) carries its own justPressed helper that remembers the previous tick's state, and that helper misses the same taps.
Activity