Key bindings layer: skills on 1-7, weapon sets on F1-F7

Raw WM_KEYDOWN/WM_KEYUP are handled in both window procedures (the game
swaps 0x8110d0 and 0x8122a0 with SetWindowLong; 0x8110d0 is the in-game
one). Bound keys are swallowed and post the original hotkey's key event
to the kernel, so F-keys work and bindings are layout independent
([keys] in sacred_re.ini). Replaces the WASD hotkey remap and the digit
swap; W/A/S/D and the digit row no longer reach the game. Skill keys
still cast through the right mouse button. Enabled switches removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-15 00:11:55 +02:00
1 parent 9fb6c6b406
commit cec2556fa3
11 files changed
+409 -279

No files matched your search

+4 -4
View File
@@ -33,11 +33,11 @@ W, A and S were game hotkeys. With WASD movement (`src/mods/wasd.cpp`) their
actions moved to other keys for now; choose final bindings (and update the
in-game texts/tooltips that name the old keys):
| Key | Action | Temporary key (`[wasd]` in sacred_re.ini) |
| Key | Action | Temporary key (sacred_re.ini) |
|---|---|---|
| W | action slot 3 (`cEngine::UseActionSlot`, like Q/E/R/B/Space) | G (`ActionKeyW`) |
| A | pick up items nearby (creature event 0x113) | V (`ActionKeyA`) |
| S | save game window (`UI_WND_SAVEGAME`) | K (`ActionKeyS`) |
| W | action slot 3 (`cEngine::UseActionSlot`, like Q/E/R/B/Space) | G (`[keys] ActionSlot3`) |
| A | pick up items nearby (creature event 0x113) | V (`[keys] PickUp`) |
| S | save game window (`UI_WND_SAVEGAME`) | K (`[keys] SaveGame`) |
| D | unbound | - |
Globally bound letters (engine `0x618130`, UI manager `0x757120`): A B C E F