Binding keys to widget actions and adjusting fog of war in beyond all reason

How to create keybindable widget actions, find KeySymbol definitions, and fix fog of war opacity issues.

Tags: beyond all reason keybinds, lua keysym, widget actions, fog of war, visibility settings

Binding keys to widgets without numeric codes

Keyboard keys have numeric codes in Lua widgets, but hardcoding them is fragile. The better approach is exposing an action from your widget and letting the standard keybinding system handle the key assignment. This respects non-QWERTY keyboard layouts automatically and lets players remap through the normal interface.

The pattern: define a named action in your widget configuration, register it with the widget handler, and bind the action through the game keybind system. Users get the familiar keybind editor experience, and the widget code stays clean and layout-agnostic.

Finding KeySymbol definitions

KeySymbol codes for BAR live in the keysym header file at luaui/Headers/keysym.h.lua in the BAR repository. This file maps symbolic names to numeric key codes used by the Spring engine input system.

Some BAR-specific hotkey additions appear in bar_hotkeys.lua. Scroll-related commands like scroll up may not appear in either file directly because they route through the engine camera system rather than widget key handlers. Check both the keysym header and the engine camera controls for complete coverage.

Adjusting fog of war opacity

Fog of war in BAR renders as wavy semi-transparent layers on unexplored terrain. If these waves make the map hard to read, adjust the fog of war opacity in the game Settings menu. Higher opacity reduces the wave visibility without changing the line of sight mode or altering the map appearance.

Clean setup, clean games

Getting controls right means playing without fighting your interface. Creed of Champions members share keybind setups and display preferences to help each other get comfortable faster.

[Crd] Credd of Champions is a great place to learn and play BAR in a friendly atmosphere. Training sessions, team gameplay, even some non-BAR stuff.

Win with skill, teamwork, and respect.