Skip to content

Static UI frame elements (like Idle Worker) ignore .csf hotkey bindings (& parser) #3011

Description

@misterhackerman

Prerequisites

  • I have searched for similar issues and confirmed this is not a duplicate

Game Version

  • Command & Conquer Generals
  • Command & Conquer Generals: Zero Hour
  • Other (please specify below)

Bug Description

Description

When modifying generals.csf to assign a hotkey to the Idle Worker button (e.g., changing Idle Worker to &Idle Worker), the text rendering engine successfully highlights the 'I' in yellow, but the engine's input handler fails to mechanically bind the hotkey. The key press does nothing.

Reproduction Steps

Steps to Reproduce

  1. Open generals.csf.
  2. Locate the string for controlbar:idleworker.
  3. Change the value from Idle Worker to &Idle Worker (or any other letter).
  4. Save the compiled file and launch the game.
  5. Hover over the Idle Worker button on the control bar and observe that the 'I' is highlighted yellow.
  6. Press the 'I' key on the keyboard.

Expected Behavior

The hotkey should select an idle worker, matching the input behavior of dynamically loaded CommandButton actions (such as controlbar:lasermissileattack, which successfully binds to 'R' when changed to Lase&r).

Actual Behavior

The key press is completely ignored. The action can still be clicked with the mouse, but the keyboard parser does not register the & binding.

Technical Context / Root Cause

The engine's input handler currently only parses & hotkeys for dynamic CommandButton objects loaded into the 14-slot command grid. It appears to skip scanning static UI frame elements (like the minimap UI or the Idle Worker button) defined in the .wnd layout files.

Additional Context

Proposed Solution:
Could the C++ UI handler be modified to either parse .csf hotkeys for static control bar elements, or expose these static buttons to CommandMap.ini so players can bind them natively without relying on the hardcoded Up/Down arrow keys?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working right, typically is user facing⚠️ TriageIssues requiring initial review and prioritization

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions