Skip to content

Commit

Permalink
fix: hotkey conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Nov 29, 2023
1 parent 80287c5 commit 138442a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Rabbit.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,11 @@ ProcessKey(key, mask, this_hotkey) {
}

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

Expand Down

0 comments on commit 138442a

Please sign in to comment.