Skip to content

Commit

Permalink
code optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
8LWXpg committed Feb 12, 2023
1 parent 83dbd61 commit 944a3f4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions RegExHotstring.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,16 @@ class RegExHs extends InputHook {
; clear input when press non-text key
OnKeyDown := this.keyDown
keyDown(vk, sc) {
if (vk = 8) {
Send("{Blind}{vk08 down}")
return
switch vk {
case 8:
Send("{Blind}{vk08 down}")
return
case 32, 9, 13, 160, 161:
return
default:
this.Stop()
this.Start()
}
if (vk = 32 || vk = 9 || vk = 13 || vk = 160 || vk = 161)
return

this.Stop()
this.Start()
}

OnKeyUp := this.keyUp
Expand Down

0 comments on commit 944a3f4

Please sign in to comment.