From 39e3f753391a7eab0fb88bd6b4b10bf63b225228 Mon Sep 17 00:00:00 2001 From: pongo1231 Date: Sun, 20 Aug 2023 13:45:20 +0000 Subject: [PATCH] ChaosMod: Allow using Ctrl, Shift & Alt key shortcut modifiers in Lua runtime --- ChaosMod/Components/LuaScripts.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChaosMod/Components/LuaScripts.cpp b/ChaosMod/Components/LuaScripts.cpp index 3ada409ef..55cd38271 100644 --- a/ChaosMod/Components/LuaScripts.cpp +++ b/ChaosMod/Components/LuaScripts.cpp @@ -981,6 +981,10 @@ LuaScripts::ParseScriptReturnReason LuaScripts::ParseScriptRaw(std::string scrip int shortcutKeycode = *shortcutKeycodeOpt; if (shortcutKeycode > 0 && shortcutKeycode < 255) { + shortcutKeycode += (effectInfo["ShortcutWithCtrl"].get_or(false) << 10); + shortcutKeycode += (effectInfo["ShortcutWithShift"].get_or(false) << 9); + shortcutKeycode += (effectInfo["ShortcutWithAlt"].get_or(false) << 8); + effectData.ShortcutKeycode = shortcutKeycode; } }