Prerequisites
Game Version
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
- Open
generals.csf.
- Locate the string for
controlbar:idleworker.
- Change the value from
Idle Worker to &Idle Worker (or any other letter).
- Save the compiled file and launch the game.
- Hover over the Idle Worker button on the control bar and observe that the 'I' is highlighted yellow.
- 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?
Prerequisites
Game Version
Bug Description
Description
When modifying
generals.csfto assign a hotkey to the Idle Worker button (e.g., changingIdle Workerto&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
generals.csf.controlbar:idleworker.Idle Workerto&Idle Worker(or any other letter).Expected Behavior
The hotkey should select an idle worker, matching the input behavior of dynamically loaded
CommandButtonactions (such ascontrolbar:lasermissileattack, which successfully binds to 'R' when changed toLase&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 dynamicCommandButtonobjects 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.wndlayout files.Additional Context
Proposed Solution:
Could the C++ UI handler be modified to either parse
.csfhotkeys for static control bar elements, or expose these static buttons toCommandMap.iniso players can bind them natively without relying on the hardcoded Up/Down arrow keys?