From 8897f0978f3d5a5d7a7376e4e45ea6495ce3aaf7 Mon Sep 17 00:00:00 2001 From: Styyx <79586869+Styyx1@users.noreply.github.com> Date: Sat, 7 Mar 2026 10:50:09 +0100 Subject: [PATCH 1/3] Update hotkeys.hpp --- include/CLIBUtil/hotkeys.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/CLIBUtil/hotkeys.hpp b/include/CLIBUtil/hotkeys.hpp index 717ea4e..4473359 100644 --- a/include/CLIBUtil/hotkeys.hpp +++ b/include/CLIBUtil/hotkeys.hpp @@ -218,13 +218,14 @@ namespace clib_util::hotkeys this->pattern = string::join(rawKeys, " + "); } - bool Process(RE::InputEvent* const* a_event) + bool Process(RE::InputEvent* const* a_event, const bool a_ignoreMoveKeysOnKeyboard = false) { if (!isValid) { return false; } std::set pressed; + bool donotinsert = false; for (auto event = *a_event; event; event = event->next) { auto button = event->AsButtonEvent(); if (!button || !button->HasIDCode()) { @@ -244,11 +245,21 @@ namespace clib_util::hotkeys break; } - if (button->IsPressed()) { + if (a_ignoreMoveKeysOnKeyboard) + { + if (key == 17 || key == 30 || key == 31 || key == 32) + { + donotinsert = true; + } + } + + if (button->IsPressed() && !donotinsert) { + SKSE::log::info("insert: {}", key); pressed.insert(key); } } + if (pressed == keys) { if (!alreadyTriggered) { alreadyTriggered = true; From 237984358dc178f58290126f59cc12cf270b929d Mon Sep 17 00:00:00 2001 From: Styyx <79586869+Styyx1@users.noreply.github.com> Date: Sat, 7 Mar 2026 11:28:46 +0100 Subject: [PATCH 2/3] removed extra logging used for debugging --- include/CLIBUtil/hotkeys.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/CLIBUtil/hotkeys.hpp b/include/CLIBUtil/hotkeys.hpp index 4473359..ef9cdb3 100644 --- a/include/CLIBUtil/hotkeys.hpp +++ b/include/CLIBUtil/hotkeys.hpp @@ -254,7 +254,6 @@ namespace clib_util::hotkeys } if (button->IsPressed() && !donotinsert) { - SKSE::log::info("insert: {}", key); pressed.insert(key); } } @@ -306,7 +305,7 @@ namespace clib_util::hotkeys this->pattern = string::join(rawKeys, " + "); // Only non-empty KeyCombinations should be considered valid. // However, we want to allow setting empty patterns to unbind given KeyCombination easily. - isValid = !keys.empty(); + isValid = !keys.empty(); return true; } @@ -333,4 +332,4 @@ namespace clib_util::hotkeys bool alreadyTriggered = false; bool isValid = false; }; -} +} \ No newline at end of file From 247a061738a76d857145bcb157ef2e2f699e40b9 Mon Sep 17 00:00:00 2001 From: Styyx <79586869+Styyx1@users.noreply.github.com> Date: Sat, 7 Mar 2026 11:48:06 +0100 Subject: [PATCH 3/3] fix ignoremove keyboard bool --- include/CLIBUtil/hotkeys.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/CLIBUtil/hotkeys.hpp b/include/CLIBUtil/hotkeys.hpp index ef9cdb3..04965d0 100644 --- a/include/CLIBUtil/hotkeys.hpp +++ b/include/CLIBUtil/hotkeys.hpp @@ -225,7 +225,6 @@ namespace clib_util::hotkeys } std::set pressed; - bool donotinsert = false; for (auto event = *a_event; event; event = event->next) { auto button = event->AsButtonEvent(); if (!button || !button->HasIDCode()) { @@ -249,11 +248,11 @@ namespace clib_util::hotkeys { if (key == 17 || key == 30 || key == 31 || key == 32) { - donotinsert = true; + continue; } } - if (button->IsPressed() && !donotinsert) { + if (button->IsPressed()) { pressed.insert(key); } }