Skip to content

Commit

Permalink
Merge pull request #182 from Kaaasper/prepatch
Browse files Browse the repository at this point in the history
quick fix for prepatch keyDown bug
  • Loading branch information
Sellorio authored Nov 17, 2022
2 parents 37b8320 + a4ac0f2 commit b09d3fb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/engine/mega-macro-engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,15 @@ end

local function GetMacroStubCode(macroId)
-- Fix a bug that causes click events not to register only when CVar ActionButtonUseKeyDown is set to 1.
local keyDownOrUp = GetCVar("ActionButtonUseKeyDown")
local primaryMacroButtonClickValue = GetCVar("ActionButtonUseKeyDown") == "1" and " LeftButton" or " "
return
GenerateIdPrefix(macroId).."\n"..
"/click [btn:1] "..ClickyFrameName..macroId..primaryMacroButtonClickValue.."\n"..
"/click [btn:2] "..ClickyFrameName..macroId.." RightButton\n"..
"/click [btn:3] "..ClickyFrameName..macroId.." MiddleButton\n"..
"/click [btn:4] "..ClickyFrameName..macroId.." Button4\n"..
"/click [btn:5] "..ClickyFrameName..macroId.." Button5\n"
"/click [btn:1] "..ClickyFrameName..macroId..primaryMacroButtonClickValue.." "..keyDownOrUp.."\n"..
"/click [btn:2] "..ClickyFrameName..macroId.." RightButton "..keyDownOrUp.."\n"..
"/click [btn:3] "..ClickyFrameName..macroId.." MiddleButton "..keyDownOrUp.."\n"..
"/click [btn:4] "..ClickyFrameName..macroId.." Button4 "..keyDownOrUp.."\n"..
"/click [btn:5] "..ClickyFrameName..macroId.." Button5 "..keyDownOrUp.."\n"
end

local function SetupGlobalMacros()
Expand Down

0 comments on commit b09d3fb

Please sign in to comment.