keylight: unship it -- opt-in (BT_KEYLIGHT=1), gone from all player docs

Operator decision: the player base is not on Windows 11, so the RGB keyboard
mirror should not be shipped or promised.  The feature is NOT deleted -- Cyd's
implementation stays intact behind the gate for whoever wants it -- it is
simply off by default and invisible:

  * PadRIO gate flips from opt-out (BT_KEYLIGHT=0 disables) to OPT-IN
    (BT_KEYLIGHT=1 enables).  Default boots produce zero keylight lines, and a
    stub build and a real build now behave identically for players: nothing.
  * Removed from every user-facing artifact: the README paragraph, the
    CONTROLS.md section, the CONTROLS.html footer line.
  * environ.ini template: the entry stays (it is the discoverable home for the
    opt-in) but now says OFF-unless-1, Windows 11 22H2+, and why it is
    unshipped.
  * mkdist's cut-time stub warning removed -- it existed to protect a README
    promise that no longer exists.
  * context/glass-cockpit.md records the decision, the opt-in, and the
    build-time SDK stub gate in one place.

VERIFIED: default boot logs zero keylight lines; BT_KEYLIGHT=1 engages the
feature (the stub on this machine: its one honest log line + the key map).
All three console suites pass; checkctx CLEAN.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-26 17:06:00 -05:00
co-authored by Claude Opus 5
parent c4202d92ca
commit 12d6862c1f
7 changed files with 18 additions and 34 deletions
+6 -1
View File
@@ -289,7 +289,12 @@ Ported from RP412 (itself vRIO's `KeyboardLampMirror`). Keys bound to a lamp add
map's side columns (0x10-0x1F), red for the rest — flashing in step with the on-screen buttons
(its `LampLevel` copy matches the FIXED `BTLampBrightnessOf`). Per-key boards light each bound
key; zone-lit boards mirror the strongest lamp board-wide. All WinRT runs on a private worker
thread. Gate: `BT_KEYLIGHT=0` opts out; no Dynamic Lighting = one log line, then dormant.
thread. Gate: **OPT-IN since 2026-07-26** -- `BT_KEYLIGHT=1` enables (operator decision: the
player base is not on Windows 11, so the feature was unshipped -- removed from README/
CONTROLS.* -- rather than promised); default is OFF and produces zero log lines. Also note
the CMakeLists BUILD gate: an SDK older than 10.0.22000 compiles a dormant five-function
stub (this build machine does), so shipping the real mirror requires a newer-SDK build.
No Dynamic Lighting at runtime = one log line, then dormant.
⚠ **RP412's packing hazard does NOT apply here.** It compiles that file with forced default struct
packing because *its* engine is `/Zp1`, which would break the WinRT ABI. BT411's `BT_OPTS` is
-1
View File
@@ -814,7 +814,6 @@
<span>BattleTech 4.11</span>
<span>gitea.mysticmachines.com/VWE/BT411</span>
<span>docs/CONTROLS.md · CONTROLS.txt ships with the game</span>
<span>RGB keyboards mirror the pod lamps · BT_KEYLIGHT=0 to disable</span>
</footer>
</div>
-4
View File
@@ -96,10 +96,6 @@ key MOUSE4 button 0x40 # side button = main trigger
key MOUSE5 button 0x46 # side button = middle thumb
```
**RGB keyboards** with Windows Dynamic Lighting mirror the panel: any key you have bound to a
lamp button glows in the panel's own colours and flashes in step with the on-screen buttons. Turn
it off with `BT_KEYLIGHT=0` in `environ.ini`.
---
## Cockpit layout
+7 -3
View File
@@ -206,13 +206,17 @@ PadRIO::PadRIO():
// yellow for the Secondary/Screen columns (0x10-0x1F), red for the rest,
// exactly like the on-screen buttons. Keypad binds have no lamp, so
// they are skipped; a key bound twice takes its FIRST binding.
// BT_KEYLIGHT=0 opts out; a machine without Dynamic Lighting logs once
// and stays dormant.
// OPT-IN since 2026-07-26 (operator decision: the player base is not on
// Windows 11, so the feature is unshipped rather than promised) --
// BT_KEYLIGHT=1 enables it; default is OFF and it appears in no
// player-facing documentation. The full mirror is intact behind the
// gate for whoever wants it, on a build whose SDK compiled the real
// thing (see the CMakeLists stub gate).
//
keyLightActive = False;
{
const char *gate = getenv("BT_KEYLIGHT");
if (gate == NULL || atoi(gate) != 0)
if (gate != NULL && atoi(gate) != 0)
{
static int lightKeys[192];
static int lightAddresses[192];
+5 -7
View File
@@ -334,13 +334,11 @@ static const char *kEnvironIniDefault =
"\n"
"# ---- Optional ---------------------------------------------------------------\n"
"\n"
"# RGB keyboard lamp mirror (Windows Dynamic Lighting): keys bound to a lamp\n"
"# button in bindings.txt glow with the panel -- yellow for the map's side\n"
"# columns, red for the rest -- and flash in step with the on-screen buttons.\n"
"# Per-key keyboards light each bound key; zone-lit boards mirror the\n"
"# strongest lamp board-wide. Unset or nonzero = on; 0 = off. A machine\n"
"# without Dynamic Lighting logs once and stays dormant.\n"
"#BT_KEYLIGHT=0\n"
"# RGB keyboard lamp mirror (Windows Dynamic Lighting, Windows 11 22H2+):\n"
"# keys bound to a lamp button glow with the panel and flash in step with the\n"
"# on-screen buttons. OFF unless you set 1 (unshipped: the player base is\n"
"# not on Windows 11, and some builds carry only a dormant stub).\n"
"#BT_KEYLIGHT=1\n"
"\n"
"# ---- Multiplayer ------------------------------------------------------------\n"
"\n"
-3
View File
@@ -129,9 +129,6 @@ of the middle of the road, or breaks each display into its own window. The
cockpit now scales to ANY window shape without distorting -- drag it, maximise
it, or launch with -fit for borderless full screen.
RGB KEYBOARDS: if yours supports Windows Dynamic Lighting, the keys you have
bound to cockpit buttons glow in the panel's colours and flash along with it.
This build: {VERSION}. Private -- do not redistribute.
{EXPIRE}Test builds STOP WORKING 14 days after they are made -- if the game
{EXPIRE}says it has expired, just grab the operator's newest zip.
-15
View File
@@ -76,21 +76,6 @@ def main():
exes = ["build/Release/btl4.exe"]
# HONESTY CHECK (2026-07-26): the RGB keylight compiles to a dormant stub
# on machines whose Windows SDK is too old (< 10.0.22000 -- see
# CMakeLists), and the README promises the feature. Say so at cut time,
# so nobody ships a stub build believing the promise.
try:
with open(exes[0], "rb") as f:
if b"built without Dynamic Lighting support" in f.read():
print(" *** NOTE: this exe carries the KEYLIGHT STUB (build "
"machine's SDK too old). The README's RGB-keyboard "
"feature will be dormant in this zip -- build on a "
"machine with SDK >= 10.0.22000 to ship the real "
"mirror. ***")
except OSError:
pass
bats = ["players/play_solo.bat", "players/join.bat", "players/join_lan.bat",
"players/joyconfig.bat"]
if steam_on: