1 Commits

Author SHA1 Message Date
Vlad Yanhursky 650dfe14ed feat(input): mapping rules on keyboard.h's key table
Add input_map.{c,h} (target xbox_input_map): named bindings and their
text format, key resolution, pad remapping, radial stick deadzones,
trigger thresholds and pad merging.

Built on #191's key table rather than beside it. A binding holds a
Windows VK code from keyboard.h, the held-key array is that table, and
the names are only the persistence format; keyboard.h gains the XBOX_VK_*
codes the names need. Outputs are XBOX_GAMEPAD with the XBOX_GAMEPAD_*
bits and XBOX_BUTTON_* slots from xinput_xbox.h, so the module has no pad
type of its own.

Stick keys keep keyboard.c's full deflection on a diagonal by default;
INPUT_DIAGONAL_ROUND opts into a unit circle. The mouse wheel has no VK
code, so wheel names are rejected and counted like any unknown name.

tests/input_map is the first version's suite ported to these types, plus
the name <-> VK table written out independently and binding strings saved
by the first version (d9a0a38).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:57:55 -04:00