Skill hotkeys cast the skill; skills on 1-5, weapon sets on 6-0

A digit that selects a combat-art slot now also presses the right mouse
button (posted WM_RBUTTONDOWN, released with the key), so the game casts
the art at the cursor like a right-click. SwapDigits trades the digit
rows; the key rewrite shares the WASD remap in the engine/UI receivers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-14 23:48:11 +02:00
1 parent b32b39f7cb
commit aa59680fb1
4 files changed
+165 -3

No files matched your search

+6 -3
View File
@@ -32,6 +32,7 @@
#include <windows.h>
#include "mods/skillkeys.h"
#include "re/config.h"
#include "re/hook.h"
#include "re/log.h"
@@ -135,9 +136,11 @@ bool IsMovementKey(int upper) {
return upper == 'W' || upper == 'A' || upper == 'S' || upper == 'D';
}
// Returns the key the game should see instead of `key` (0: none).
// Returns the key the game should see instead of `key` (0: none). Also
// applies the skill hotkeys' digit swap (src/mods/skillkeys.cpp).
uint16_t RemapKey(uint16_t key) {
if (key >= 0x80) {
key = mods::skillkeys::RemapKey(key);
if (key >= 0x80 || !Enabled()) {
return key;
}
const int upper = toupper(key);
@@ -159,7 +162,7 @@ thread_local int g_keyEventDepth = 0;
class KeyEventRemap {
public:
explicit KeyEventRemap(void* event) {
if (g_keyEventDepth++ > 0 || !Enabled() || !event ||
if (g_keyEventDepth++ > 0 || !event ||
*static_cast<uint32_t*>(event) != kEventKeyVtable) {
return;
}