ludic/changes/arrow-keys.md
Orkuncakilkaya 6117f73602 fix(input): Key.Up/Down/Left/Right are the held set's 128-131
The arrow Key constants folded to the codes of w/s/a/d, which is what the
per-frame key reports for an arrow, but cocoa.ll has always stored an arrow in
the held-key set under 128-131. So Input.key_down(Key.Up) read the W bit and
Input.move_i's arrow half never moved anything. Input.key keeps its WASD alias,
so games comparing it with 'w' (snake, chronorift) still take the arrows.

New example input_arrows.ludic, checked by ludic-dev test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 03:00:29 +03:00

483 B

bump: patch type: fix Held arrow keys register — Key.Up, Key.Down, Key.Left and Key.Right are 128-131.

They folded to the codes of w, s, a and d, which is what the single per-frame key (Input.key) reports for an arrow. The held-key set has always stored an arrow under 128-131, so Input.key_down(Key.Up) tested the W bit and Input.move_i's arrow half never moved anything. Input.key keeps its WASD alias: a game comparing it with 'w' still takes the arrows.