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:
1 parent
9fb6c6b406
commit
cec2556fa3
11 files changed
+409
-279
No files matched your search
+7
-3
@@ -49,9 +49,13 @@ badly; targets near the stepwise-updated position make it arrive and stop.
|
||||
Keys reach the game as `cEvent_key` (category 4; key at +6/+8, modifiers at
|
||||
+0xa) through the kernel queue to `cEngine::ReceiveEvent` (`0x618130`), which
|
||||
offers them to `cUI_Manager::ReceiveEvent` (`0x757120`) first. Both compare
|
||||
`toupper(key)` (`0x84aa86`). The mod swallows W/A/S/D there (auto-repeat events
|
||||
would trigger the hotkeys) and rewrites the replacement keys into the old
|
||||
letters; the temporary bindings are listed in `docs/todo.md`.
|
||||
`toupper(key)` (`0x84aa86`). Presses come from `WM_CHAR` (the character), releases
|
||||
from `WM_KEYUP` (the virtual key), so keys without a character (F-keys) never
|
||||
reach the hotkeys. The key bindings (`src/mods/input.cpp`) handle the raw
|
||||
`WM_KEYDOWN`/`WM_KEYUP` instead: W/A/S/D and the digit row are kept from the
|
||||
game, bound keys post the original hotkey's key event (`Kernel_Instance`
|
||||
`0x808490`, `cKernel::PostEvent` `0x808930`); the temporary bindings for the
|
||||
old W/A/S actions are listed in `docs/todo.md`.
|
||||
|
||||
Hotkeys found: engine A (pick up nearby), P (pause), Q/W/E/R/B/Space
|
||||
(`cEngine::UseActionSlot`), ^ (console), Esc, Ctrl+B/F/X/Z (Z quicksave); UI
|
||||
|
||||
Reference in new issue
Block a user