# Full keyboard support — tested and fixed

## Was it working when you asked? No — and testing it myself proved that.

The self-test (synthetic buffer injection -> PRINT 3+4 = 7) passed, but REAL
typing did not. Booting the ISO in QEMU and sending real keystrokes showed the
actual behavior.

## Bug found: doubled characters (AABBCDDEE)

Typing `abcde` produced `AABBCDDEE`. Raw-scancode logging proved the keyboard
IRQ + ring were clean (one make + one break per key). The doubling came from
TWO delivery paths both handing each key to the KERNAL:
  1. the universal translator's buffer injection (c64_input -> $0277/$C6), and
  2. OS64's CIA key-MATRIX update in IO::OnKeyDown, which the KERNAL's own IRQ
     keyboard scan then also delivered.

## Fix

When the interactive face is active, suppress the CIA matrix update in
IO::OnKeyDown so the translator's buffer injection is the SOLE delivery path.
Also cleared the KERNAL "key held" registers ($CB/$C5/$028A) in c64_input to
prevent auto-repeat, and made the ring drain atomic (cli/snapshot/sti).

## Verified end-to-end (in QEMU, booting the real ISO)

- `abcde`  -> ABCDE      (no doubling)
- `HELLO`  -> HELLO      (legitimate double-L preserved)
- typed `PRINT 6*7` <RET> -> 42
- typed `PRINT 99`  <RET> -> 99

Real BASIC parses the TYPED line and executes it. Full interactive keyboard.

## Boot

Rufus `iso/hdgl-c64.iso` (DD mode) -> USB -> boot NVS 295 -> interactive entry ->
wait for READY. -> type BASIC and press Return.
