Small cosmetic changes, also added some default keys to F7 hotkey, maybe should stop using F keys...
This commit is contained in:
56
Echo.ahk
56
Echo.ahk
@@ -5,8 +5,8 @@ SetWorkingDir %A_ScriptDir%
|
|||||||
#SingleInstance force
|
#SingleInstance force
|
||||||
#Persistent
|
#Persistent
|
||||||
|
|
||||||
SetKeyDelay, -1
|
SetKeyDelay, 0
|
||||||
SetControlDelay, -1
|
SetControlDelay, 100
|
||||||
|
|
||||||
ih := InputHook("B")
|
ih := InputHook("B")
|
||||||
ih.KeyOpt("{All}", "NV")
|
ih.KeyOpt("{All}", "NV")
|
||||||
@@ -28,22 +28,6 @@ global paused := 0
|
|||||||
|
|
||||||
SetTimer, ResetHook, -60000
|
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) {
|
OnKeyDown(InputHook, VK, SC) {
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
key := GetKeyName(Format("vk{:x}sc{:x}", VK, SC))
|
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) {
|
OnKeyUp(InputHook, VK, SC) {
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
key := GetKeyName(Format("vk{:x}sc{:x}", VK, SC))
|
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
|
; Not really mine at all
|
||||||
SortArray(Array, Order="A") {
|
SortArray(Array, Order="A") {
|
||||||
;Order A: Ascending, D: Descending, R: Reverse
|
;Order A: Ascending, D: Descending, R: Reverse
|
||||||
@@ -352,6 +336,24 @@ F6::
|
|||||||
TogglePause()
|
TogglePause()
|
||||||
return
|
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:
|
ButtonSave:
|
||||||
Gui, Submit
|
Gui, Submit
|
||||||
WhitelistKeys(KeyLogUI)
|
WhitelistKeys(KeyLogUI)
|
||||||
|
31
ssddddd
31
ssddddd
@@ -1,31 +0,0 @@
|
|||||||
[1mdiff --git a/Echo.ahk b/Echo.ahk[m
|
|
||||||
[1mindex fa4413e..d0a0292 100644[m
|
|
||||||
[1m--- a/Echo.ahk[m
|
|
||||||
[1m+++ b/Echo.ahk[m
|
|
||||||
[36m@@ -24,6 +24,8 @@[m [menabledWindows.Push(Array())[m
|
|
||||||
global keyLog := Array()[m
|
|
||||||
global whitelistKeys := Array()[m
|
|
||||||
[m
|
|
||||||
[32m+[m[32mSetTimer, ResetHook, -60000[m
|
|
||||||
[32m+[m
|
|
||||||
; whitelistKeys["q"] := 1[m
|
|
||||||
; whitelistKeys["e"] := 1[m
|
|
||||||
; whitelistKeys[1] := 1[m
|
|
||||||
[36m@@ -277,6 +279,17 @@[m [mRemoveCurrentWindow() {[m
|
|
||||||
}[m
|
|
||||||
}[m
|
|
||||||
[m
|
|
||||||
[32m+[m[32mResetHook:[m
|
|
||||||
[32m+[m[32m ih := InputHook("B")[m
|
|
||||||
[32m+[m[32m ih.KeyOpt("{All}", "NV")[m
|
|
||||||
[32m+[m[32m ih.OnKeyDown := Func("OnKeyDown")[m
|
|
||||||
[32m+[m[32m ih.OnKeyUp := Func("OnKeyUp")[m
|
|
||||||
[32m+[m[32m ih.Start()[m
|
|
||||||
[32m+[m[32m ; Tooltip, WIN[m
|
|
||||||
[32m+[m[32m SetTimer, ResetHook, -60000[m
|
|
||||||
[32m+[m[32mreturn[m
|
|
||||||
[32m+[m
|
|
||||||
[32m+[m
|
|
||||||
F5::[m
|
|
||||||
ih := InputHook("B")[m
|
|
||||||
ih.KeyOpt("{All}", "NV")[m
|
|
Reference in New Issue
Block a user