--- id: LSN-0012 ticket: legacy-runtime-learn-import title: Input Mental Model created: 2026-03-27 tags: [migration, tech-debt] --- # Input Mental Model Status: pedagogical Companion spec: [`../specs/06-input-peripheral.md`](../../specs/06-input-peripheral.md) PROMETEU treats input as sampled state, not as an asynchronous event. ## State Versus Event The most important model to understand is: - a button does not "fire" an action by itself; - a button changes state; - the game reads that state during the frame. That looks much more like classic console register polling than like modern UI callbacks. ## Why This Matters This model: - improves determinism; - simplifies replay; - makes debugging easier; - makes the frame loop easier to read. It also fits PROMETEU's identity better as a machine strongly inspired by retro hardware and DIY construction. ## Good Habits - read input in `UPDATE`; - map actions, not physical keys; - separate input reading from heavy logic; - treat polling as part of the frame budget. ## Teaching Value The input peripheral helps teach: - the difference between state and event; - temporal sampling; - synchronization between input and logic; - determinism in interactive systems.