diff --git a/EVE-X-Preview.json b/EVE-X-Preview.json index e1ffb2e..9116cb7 100644 --- a/EVE-X-Preview.json +++ b/EVE-X-Preview.json @@ -74,7 +74,7 @@ "Tertiashi", "Quartomo" ], - "ForwardsHotkey":"Tab" + "ForwardsHotkey":"Tab,XButton2" } }, "Hotkeys":[ @@ -220,8 +220,8 @@ "CharacterNameOverlayHotkeyColor":"AAAAAA", "CharacterNameOverlayHotkeySize":14, "CharacterNameOverlayPosition":{ - "x":1118, - "y":0 + "x":1108, + "y":17 }, "CharacterNameOverlayTextBold":1, "CharacterNameOverlayTextColor":"FFFFFF", diff --git a/src/Main_Class.ahk b/src/Main_Class.ahk index 43b5d21..0da37ca 100644 --- a/src/Main_Class.ahk +++ b/src/Main_Class.ahk @@ -577,26 +577,39 @@ Class Main_Class extends ThumbWindow { for k, v in This.Hotkey_Groups { ; Check if auto-forward is enabled for this group hasAutoForward := v.Has("AutoForwardOnKeypress") && v["AutoForwardOnKeypress"] - + + Arr := v["Characters"] + ; ForwardsHotkey and BackwardsHotkey only trigger when EVE window is active - if( v["ForwardsHotkey"] != "" ) { - Fkey := v["ForwardsHotkey"], Arr := v["Characters"] + ; Support multiple hotkeys separated by comma (e.g., "Tab,SC029") + if( v["ForwardsHotkey"] != "" ) { + forwardsHotkeys := StrSplit(v["ForwardsHotkey"], ",") HotIf ObjBindMethod(This, "OnWinActive", Arr) - try { - Hotkey( v["ForwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"ForwardsHotkey"), "P1") - } - catch ValueError as e { - MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Forwards Hotkey" ) + for _, Fkey in forwardsHotkeys { + Fkey := Trim(Fkey) + if (Fkey = "") + continue + try { + Hotkey( Fkey, ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"ForwardsHotkey"), "P1") + } + catch ValueError as e { + MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Forwards Hotkey" ) + } } } if( v["BackwardsHotkey"] != "" ) { - Fkey := v["BackwardsHotkey"], Arr := v["Characters"] + backwardsHotkeys := StrSplit(v["BackwardsHotkey"], ",") HotIf ObjBindMethod(This, "OnWinActive", Arr) - try { - Hotkey( v["BackwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"BackwardsHotkey"), "P1") - } - catch ValueError as e { - MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkey Groups - " k " - Backwards Hotkey" ) + for _, BKey in backwardsHotkeys { + BKey := Trim(BKey) + if (BKey = "") + continue + try { + Hotkey( BKey, ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"BackwardsHotkey"), "P1") + } + catch ValueError as e { + MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkey Groups - " k " - Backwards Hotkey" ) + } } } ; Store auto-forward groups and register separate toggle hotkey