Fix lag evaluating ExtraModifiers every keydown

This commit is contained in:
2026-01-04 20:11:05 +01:00
parent 85853fe781
commit 1ece6a3be0

View File

@@ -410,9 +410,9 @@
;if the user has selected Global Hotkey. This means the Hotkey will alsways trigger as long at least 1 EVE Window exist.
;if a Window does not Exist which was assigned to the hotkey the hotkey will be dissabled until the Window exist again
if(This.Global_Hotkeys) {
HotIf (*) => WinExist(This.EVEExe) && WinExist("EVE - " title ) && !WinActive("EVE-X-Preview - Settings") && !This.HasExtraModifiers(hk)
HotIf (*) => WinExist(This.EVEExe) && WinExist("EVE - " title ) && !WinActive("EVE-X-Preview - Settings")
try {
Hotkey hk, (*) => This.ActivateEVEWindow(,,title), "P1"
Hotkey hk, (*) => This.ActivateEVEWindow_WithModifierCheck(,,title, hk), "P1"
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
@@ -421,9 +421,9 @@
;if the user has selected (Win Active) the hotkeys will only trigger if at least 1 EVE Window is Active and in Focus
;This makes it possible to still use all keys outside from EVE
else {
HotIf (*) => WinExist("EVE - " title ) && WinActive(This.EVEExe) && !This.HasExtraModifiers(hk)
HotIf (*) => WinExist("EVE - " title ) && WinActive(This.EVEExe)
try {
Hotkey hk, (*) => This.ActivateEVEWindow(,,title),"P1"
Hotkey hk, (*) => This.ActivateEVEWindow_WithModifierCheck(,,title, hk),"P1"
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
@@ -432,6 +432,13 @@
}
}
; Wrapper that checks for extra modifiers before activating window
ActivateEVEWindow_WithModifierCheck(hwnd?, ThisHotkey?, title?, hk?) {
if (IsSet(hk) && This.HasExtraModifiers(hk))
return
This.ActivateEVEWindow(hwnd?, ThisHotkey?, title?)
}
; Check if extra modifiers are pressed beyond what's in the hotkey string
HasExtraModifiers(hk) {
; Check which modifiers are in the hotkey