ludic/docs/language/input
Orkuncakilkaya 53bb441f23
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 18s
ci / build-and-test (push) Successful in 1m24s
commit-lint / conventional-commits (push) Successful in 5s
docs / build-and-deploy (push) Successful in 20s
feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50)
The raw device layer the input proposal sketched, over the action maps +
record/replay of #7. Beyond one key per frame, gameplay can read:

- Multiple simultaneous held keys: Input.key_down / key_pressed / key_released,
  with clean rising/falling edges (hold left AND jump).
- Analog from keys: Input.axis(neg, pos) and a normalized Input.vector(l,r,u,d)
  (diagonals scaled by 1/sqrt(2)), plus Input.strength(action).
- Mouse: Input.mouse_x/y, mouse_dx/dy (per-frame delta), mouse_down(btn), wheel.
- Gamepads: Input.pad_connected/pad_button/pad_axis (SDL-order buttons, -1..1
  sticks); touch: Input.touch_count/touch_x/touch_y.

The held set is fed by the platform when windowed — cocoa.ll now tracks
keyDown/keyUp into a 256-bit held-key bitset (win_held) and the mouse
buttons/wheel (win_mouse), gated so headless builds DCE the native calls — and
by the Input.press / Input.set_mouse / Input.set_pad / Input.set_touch injection
on every target (Godot-style action injection: replays, AI, network-fed input).
Input.record / replay now snapshot the full per-frame device state (held set +
mouse), extending #7's single-key tape.

Everything is integer and deterministic, so the same inputs reproduce the same
frame on every run and headless. The gamepad/touch native hardware bindings
(GameController.framework / NSTouch) feed the same injected state and are the one
remaining platform-glue follow-up; the software layer, semantics and replay are
complete and driven deterministically today.

Worked example + regression: examples/library/input_device.ludic
(1 1 0 1 0 1 71 -71 5 1 3 1 2 1 0 0 1, injection-driven headless). 23 new
docs/language/input pages. Full suite 78 passed, self-host C-free fixpoint
intact, no golden drift; cocoa.ll assembles and a windowed build links.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-31 17:14:24 +03:00
..
_section.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-axis.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-bind.md feat(input): action maps + deterministic record/replay (#7) 2026-08-31 16:03:56 +03:00
input-down.md feat(input): action maps + deterministic record/replay (#7) 2026-08-31 16:03:56 +03:00
input-key.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
input-key_down.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-key_pressed.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-key_released.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-mouse_down.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-mouse_dx.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-mouse_dy.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-mouse_x.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-mouse_y.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-pad_axis.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-pad_button.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-pad_connected.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-poll.md feat(input): action maps + deterministic record/replay (#7) 2026-08-31 16:03:56 +03:00
input-press.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-pressed.md feat(input): action maps + deterministic record/replay (#7) 2026-08-31 16:03:56 +03:00
input-rebind.md feat(input): action maps + deterministic record/replay (#7) 2026-08-31 16:03:56 +03:00
input-record.md feat(input): action maps + deterministic record/replay (#7) 2026-08-31 16:03:56 +03:00
input-release.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-replay.md feat(input): action maps + deterministic record/replay (#7) 2026-08-31 16:03:56 +03:00
input-set_mouse.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-set_pad.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-set_touch.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-strength.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-touch_count.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-touch_x.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-touch_y.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-vector.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00
input-wheel.md feat(input): raw device layer — multi-key held state, analog, mouse, gamepad, touch, full-state replay (#50) 2026-08-31 17:14:24 +03:00