FORTH: KEY-EVENT unified keyboard interface, closes 4.3.5-4.3.5f (item 4.3.5f)

Punch list §25 item 4.3.5f complete. Keyboard-input slice done.

New KEY-EVENT ( -- keycode pressed -1 | 0 ) converges amd64's i8042,
riscv64's and aarch64's virtio-keyboard-pci behind one shape. Translation
needed is minimal: XT Set-1 make codes and Linux input keycodes are
numerically identical across the standard 84-key block (a documented
historical property of the Linux input subsystem, confirmed against this
host's own headers and this tree's own prior live observations), so amd64
needs two lines, riscv64/aarch64 need none. Verified live with a real
keypress on all three architectures: identical "-1 1 30" output everywhere.
Three-arch acceptance boot clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-08-08 12:48:05 -04:00
co-authored by Claude Sonnet 5
parent a373c9124a
commit d0835c674b
17 changed files with 108582 additions and 75 deletions
+9
View File
@@ -41,6 +41,15 @@
*
* @par VKBD-DEBUG ( -- isr_count )
* Standing diagnostic: count of virtio-input ISR invocations since boot.
*
* @par KEY-EVENT ( -- keycode pressed -1 | 0 )
* Item 4.3.5f convergence checkpoint. One shared event shape across all
* three architectures: keycode in the Linux input keycode namespace
* (identical numbering to amd64's raw XT Set-1 scancode for the
* non-extended key range, by historical design, not translated arbitrarily
* -- see the implementation's own doc comment), pressed is 1 or 0. This is
* the word the later REPL keyboard-input work (M8) is expected to build
* on; KBD-SCAN/VKBD-EVENT remain as lower-level per-device diagnostics.
* @}
*/