https://gitlab.synchro.net/main/sbbs/-/commit/1641cd3f67adbffee9e953bc
Added Files:
src/doors/syncduke/tests/test_evdev.c
Modified Files:
src/doors/syncduke/Game/src/menues.c player.c src/doors/syncduke/syncduke.h syncduke_input.c syncduke_io.c src/doors/syncduke/tests/test_kitty.c
Log Message:
syncduke: SyncTERM evdev physical-key input tier
Deuce added physical-key event reporting to SyncTERM/CTerm (CTDA cap 8): once negotiated, presses/releases arrive as CSI=<evdev-code>K/k -- layout-independent
scancodes with true key-up and no auto-repeat. Better for a game than the byte path (WASD works on AZERTY/Dvorak, real modifier-hold, no repeat noise) and than
kitty (which SyncTERM doesn't speak).
- syncduke_input.c: g_evdev_active + negotiation in the CTDA scan; evdev_edge()
routes modifier keys -> a Shift/Ctrl/Alt mask, arrows/nav/F-keys -> scancodes
& door actions, others -> ASCII via a US-QWERTY fold table, then reuses
handle_key() so all hold/shortcut/map logic is shared with the kitty path.
Also bounds the APC/string-sequence swallow so an unterminated one can't lock
up input.
- syncduke.h / syncduke_io.c: syncduke_evdev_active() decl; exit cleanup
disables the reports.
- Setup Controls (menues.c): under native key-up (kitty or evdev) KEY TAP/HOLD
are moot (greyed "NATIVE"); TURN SPEED / FAST TURN stay live -- they tune the
synthetic turn the door falls back to on a high-latency link.
- Native-turn feel (player.c): under native key-up the engine's own ramp drives
turning, so FAST TURN (a byte-path fix for gappy auto-repeat) is gated out of
the native path -- it then only tunes the high-latency synthetic fallback,
matching the Setup Controls hint. The native top turn speed is trimmed to 3/4
(a clean key-hold accumulates turn faster than a real keyboard did).
- Look/Aim like the original, under native key-up (the byte path keeps its pitch
notch): PgUp/PgDn & numpad KP9/KP3 drive the engine's Look_Up/Down (hold to
look, auto-centers on release); Home/End & KP7/KP1 drive Aim_Up/Down (hold to
look, holds position) -- by holding the real bound scancodes so the engine
does the authentic pitch. Legacy/byte terminals are unchanged (notch + Center).
- tests/test_evdev.c (new) + test_kitty.c: cover negotiate, hold+release, native
turn, high-latency synthetic turn, modifier folds, F-keys, menu-vs-gameplay,
and the Look/Aim scancode paths. Both pass.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net