Skip to content

Commit 138442a

Browse files
committed
fix: hotkey conflict
1 parent 80287c5 commit 138442a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Rabbit.ahk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,11 @@ ProcessKey(key, mask, this_hotkey) {
295295
}
296296

297297
if not processed {
298-
if RegExMatch(SubStr(this_hotkey, 2), "([\<\>\^\+]+)(.+)", &matched)
299-
SendInput(StrReplace(StrReplace(matched[1], "<"), ">") . "{" . matched[2] . "}")
300-
else
301-
SendInput("{" . key . "}")
298+
local shift := (mask & KeyDef.mask["Shift"]) ? "+" : ""
299+
local ctrl := (mask & KeyDef.mask["Ctrl"]) ? "^" : ""
300+
local alt := (mask & KeyDef.mask["Alt"]) ? "!" : ""
301+
local win := (mask & KeyDef.mask["Win"]) ? "#" : ""
302+
SendInput(shift . ctrl . alt . win . "{" . key . "}")
302303
}
303304
}
304305

0 commit comments

Comments
 (0)