Skip to content

Commit

Permalink
ChaosMod: Allow using Ctrl, Shift & Alt key shortcut modifiers in Lua…
Browse files Browse the repository at this point in the history
… runtime
  • Loading branch information
pongo1231 committed Aug 20, 2023
1 parent 8ab4a76 commit 39e3f75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChaosMod/Components/LuaScripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 39e3f75

Please sign in to comment.