Fixed bug regarding modifier keys

This commit is contained in:
PhatDave
2021-10-27 15:34:34 +02:00
parent 86d37fe3be
commit 21f5e93777

View File

@@ -34,8 +34,10 @@ OnKeyDown(InputHook, VK, SC) {
OnKeyUp(InputHook, VK, SC) {
key := GetKeyName(Format("vk{:x}sc{:x}", VK, SC))
for k, v in enabledWindows[1] {
ControlSend,, {%key% up}, ahk_pid %v%
if (whitelistKeys.HasKey(key)) {
for k, v in enabledWindows[1] {
ControlSend,, {%key% up}, ahk_pid %v%
}
}
}
@@ -132,6 +134,8 @@ KeyLogToString() {
output := ""
for k, v in keyLog {
output .= k
output .= " "
output .= v
output .= "|"
}
StringTrimRight, output, output, 1