From d82d7cee48dec2e68dabd6027c0e6d752452f716 Mon Sep 17 00:00:00 2001 From: PhatDave Date: Tue, 2 Nov 2021 15:24:31 +0100 Subject: [PATCH] Small cosmetic changes, also added some default keys to F7 hotkey, maybe should stop using F keys... --- Echo.ahk | 56 +++++++++++++++++++++++++++++--------------------------- ssddddd | 31 ------------------------------- 2 files changed, 29 insertions(+), 58 deletions(-) delete mode 100644 ssddddd diff --git a/Echo.ahk b/Echo.ahk index 7a328e3..a9066a2 100644 --- a/Echo.ahk +++ b/Echo.ahk @@ -5,8 +5,8 @@ SetWorkingDir %A_ScriptDir% #SingleInstance force #Persistent -SetKeyDelay, -1 -SetControlDelay, -1 +SetKeyDelay, 0 +SetControlDelay, 100 ih := InputHook("B") ih.KeyOpt("{All}", "NV") @@ -28,22 +28,6 @@ global paused := 0 SetTimer, ResetHook, -60000 -whitelistKeys["q"] := 1 -whitelistKeys["e"] := 1 -whitelistKeys[1] := 1 -whitelistKeys[2] := 1 -whitelistKeys[3] := 1 -whitelistKeys[4] := 1 -whitelistKeys[5] := 1 -whitelistKeys["LShift"] := 1 -whitelistKeys["LControl"] := 1 -whitelistKeys["g"] := 1 -whitelistKeys["v"] := 1 -whitelistKeys["r"] := 1 -whitelistKeys["f"] := 1 -whitelistKeys["c"] := 1 -whitelistKeys["y"] := 1 - OnKeyDown(InputHook, VK, SC) { if (!paused) { key := GetKeyName(Format("vk{:x}sc{:x}", VK, SC)) @@ -86,15 +70,6 @@ OnKeyDown(InputHook, VK, SC) { } } -ShowTooltip(text) { - ToolTip, %text% - SetTimer, RemoveToolTip, -800 -} - -RemoveToolTip: - ToolTip -return - OnKeyUp(InputHook, VK, SC) { if (!paused) { key := GetKeyName(Format("vk{:x}sc{:x}", VK, SC)) @@ -106,6 +81,15 @@ OnKeyUp(InputHook, VK, SC) { } } +ShowTooltip(text) { + ToolTip, %text% + SetTimer, RemoveToolTip, -800 +} + +RemoveToolTip: + ToolTip +return + ; Not really mine at all SortArray(Array, Order="A") { ;Order A: Ascending, D: Descending, R: Reverse @@ -352,6 +336,24 @@ F6:: TogglePause() return +F7:: + whitelistKeys["q"] := 1 + whitelistKeys["e"] := 1 + whitelistKeys[1] := 1 + whitelistKeys[2] := 1 + whitelistKeys[3] := 1 + whitelistKeys[4] := 1 + whitelistKeys[5] := 1 + whitelistKeys["LShift"] := 1 + whitelistKeys["LControl"] := 1 + whitelistKeys["g"] := 1 + whitelistKeys["v"] := 1 + whitelistKeys["r"] := 1 + whitelistKeys["f"] := 1 + whitelistKeys["c"] := 1 + whitelistKeys["y"] := 1 +return + ButtonSave: Gui, Submit WhitelistKeys(KeyLogUI) diff --git a/ssddddd b/ssddddd deleted file mode 100644 index 77f5ff1..0000000 --- a/ssddddd +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/Echo.ahk b/Echo.ahk -index fa4413e..d0a0292 100644 ---- a/Echo.ahk -+++ b/Echo.ahk -@@ -24,6 +24,8 @@ enabledWindows.Push(Array()) - global keyLog := Array() - global whitelistKeys := Array() -  -+SetTimer, ResetHook, -60000 -+ - ; whitelistKeys["q"] := 1 - ; whitelistKeys["e"] := 1 - ; whitelistKeys[1] := 1 -@@ -277,6 +279,17 @@ RemoveCurrentWindow() { - } - } -  -+ResetHook: -+ ih := InputHook("B") -+ ih.KeyOpt("{All}", "NV") -+ ih.OnKeyDown := Func("OnKeyDown") -+ ih.OnKeyUp := Func("OnKeyUp") -+ ih.Start() -+ ; Tooltip, WIN -+ SetTimer, ResetHook, -60000 -+return -+ -+ - F5:: - ih := InputHook("B") - ih.KeyOpt("{All}", "NV")