Skip to content

Commit

Permalink
Fixed custom combos triggering incorrectly after one suspends itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexikos committed Mar 30, 2019
1 parent 014765e commit 108a8d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/hook.cpp
Expand Up @@ -709,6 +709,10 @@ LRESULT LowLevelCommon(const HHOOK aHook, int aCode, WPARAM wParam, LPARAM lPara
//if (!vk && !sc)
// return AllowKeyToGoToSystem;

// Fix for v1.1.31.02: This is done before the used_as check to ensure it doesn't get "stuck down"
// when a custom combination hotkey Suspends itself, thereby causing used_as to be reset to false.
this_key.is_down = !aKeyUp;

if (!this_key.used_as_prefix && !this_key.used_as_suffix)
return AllowKeyToGoToSystem;

Expand All @@ -733,7 +737,6 @@ LRESULT LowLevelCommon(const HHOOK aHook, int aCode, WPARAM wParam, LPARAM lPara
this_key.hotkey_to_fire_upon_release = HOTKEY_ID_INVALID;
}
}
this_key.is_down = !aKeyUp;
bool modifiers_were_corrected = false;

if (aHook == g_KeybdHook)
Expand Down

0 comments on commit 108a8d4

Please sign in to comment.