Key-command audit: the up arrow was the abort key; bombs disarmed

Full input-surface audit of the PC keyboard channel. The arcade abort
was the typed ampersand character (0x26), but the Win32 port feeds
WM_KEYUP VIRTUAL-KEY codes into the same channel - and VK_UP is also
0x26. The hat look-up key aborted the mission: that was every mystery
abort across the multiplayer test rounds. Likewise the E key (0x45,
the right pedal!) dumped the event queue on every release.

Disarmed: plain 0x26 and E are swallowed at the L4 layer; the abort
answers only to the deliberate Alt+Q chord (translated to the legacy
engine code, so APP.cpp is untouched); the debug toggles (wireframe
Alt+W, predator vision Alt+V, frame dump Alt+F, perf stats, event
queue on Alt+E now) arm only with RP412DEVKEYS=1. The cheat-string
manager has no PC-keyboard strings and the trace-log keys are
compiled out of release - both inert.

Verified live: a volley of VK_UP releases mid-race leaves the mission
running; Alt+Q aborts on demand. Docs and the dist README updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-13 09:47:04 -05:00
co-authored by Claude Fable 5
parent 18c6f05cf1
commit fbd23ff1ca
4 changed files with 59 additions and 14 deletions
+49 -10
View File
@@ -717,13 +717,58 @@ void
{
Check(this);
Check(message);
//
// The debug keys are for developers: RP412DEVKEYS=1 arms them.
// Players get exactly one chord - Alt+Q, the deliberate abort.
//
static int dev_keys = -1;
if (dev_keys < 0)
{
const char *dev_value = getenv("RP412DEVKEYS");
dev_keys = (dev_value != NULL && atoi(dev_value) != 0) ? 1 : 0;
}
switch (message->dataContents)
{
//----------------------------------------------------------------
// Abort the mission, deliberately. The engine's legacy abort char
// is '&' (0x26) - but WM_KEYUP feeds VIRTUAL-KEY codes into this
// channel and VK_UP is also 0x26, so the plain code is swallowed
// below and the abort answers only to this chord.
//----------------------------------------------------------------
case PCK_ALT_Q:
message->dataContents = '&';
Application::KeyCommandMessageHandler(message);
break;
//----------------------------------------------------------------
// Swallowed collisions: 0x26 is VK_UP (the hat look-up key!) as
// well as a typed ampersand; 'E' (0x45 = the right-pedal key) was
// the event-queue dump. Neither may reach the engine handler.
//----------------------------------------------------------------
case '&':
case 'E':
break;
//------------------------------------
// Report current event queue (moved
// off the pedal key)
//------------------------------------
case PCK_ALT_E:
{
if (!dev_keys) break;
Check(application);
application->DumpEventQueue();
break;
}
//--------------------------------------------
// FrameDump from Division card to Targa file
//--------------------------------------------
case PCK_ALT_F:
{
if (!dev_keys) break;
DPLRenderer *dpl_renderer = l4_application->GetVideoRenderer();
if (dpl_renderer)
{
@@ -738,6 +783,7 @@ void
//------------------------------------
case PCK_ALT_K:
{
if (!dev_keys) break;
//STUBBED: HEAP RB 1/20/07
/*DPLRenderer *dpl_renderer = l4_application->GetVideoRenderer();
if (dpl_renderer)
@@ -759,21 +805,12 @@ void
break;
}
//------------------------------------
// Report current event queue
//------------------------------------
case 'E':
{
Check(application);
application->DumpEventQueue();
break;
}
//---------------------------------------
// Report performance statistics (Alt-?)
//---------------------------------------
case PCK_ALT_SLASH:
{
if (!dev_keys) break;
DPLRenderer *dpl_renderer = l4_application->GetVideoRenderer();
if (dpl_renderer)
{
@@ -787,6 +824,7 @@ void
//--------------------------
case PCK_ALT_W:
{
if (!dev_keys) break;
DPLRenderer *dpl_renderer = l4_application->GetVideoRenderer();
if (dpl_renderer)
{
@@ -800,6 +838,7 @@ void
//--------------------------
case PCK_ALT_V:
{
if (!dev_keys) break;
DPLRenderer *dpl_renderer = l4_application->GetVideoRenderer();
if (dpl_renderer)
{
+2
View File
@@ -120,6 +120,8 @@
# define PCK_ALT_F (ALT_BIT | 'F')
# define PCK_ALT_K (ALT_BIT | 'K')
# define PCK_ALT_V (ALT_BIT | 'V')
# define PCK_ALT_E (ALT_BIT | 'E')
# define PCK_ALT_Q (ALT_BIT | 'Q')
# define PCK_ALT_SLASH (ALT_BIT | VK_OEM_2) // '/?' key
//