From 138442ab8e1188329ca621f72f102d7c8cc668cc Mon Sep 17 00:00:00 2001 From: Xuesong Peng Date: Wed, 29 Nov 2023 09:32:55 +0800 Subject: [PATCH] fix: hotkey conflict --- Rabbit.ahk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Rabbit.ahk b/Rabbit.ahk index c56a26b..fdd596f 100644 --- a/Rabbit.ahk +++ b/Rabbit.ahk @@ -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 . "}") } }