重新映射 RShift 但允许它在与 Autohotkey 中的另一个键组合时工作
Remap RShift but allow it to work when it's combined with another key in Autohotkey
我按以下方式重新映射了 RShift:
~RShift::Send {LShift}
RShift UP::Send {Alt down}{LShift}{Alt up}
这里我已经将 RShift 重新映射到 ALT+SHIFT,但是当我按住 RShift ] 并输入它仍将照常执行的内容(将使其大写)。我唯一的问题是,当我释放它时,它仍然执行 ALT+SHIFT,如果我拿着它,我不希望它执行。
我看到一些解释说这是有可能的,但我就是找不到。 :)
谢谢!
这应该适合你,评论中的解释:
RShift::
Send, {LShift down} ; Send our Left Shift down
KeyWait, RShift ; Wait until Right Shift is released
If (A_TimeSinceThisHotkey < 500) { ; If RShift was released very quickly do below..
Send, {LSHift up} ; Release the initial Left Shift
Send {Alt down}{LShift}{Alt up} ; Send your sequence of keys
Return ; exit from Sub Routine
}
Else ; else if Right Was held longer than 500 milliseconds
Send, {LSHift up} ; Release the initial Left Shift
Return ; exit from Sub Routine
我按以下方式重新映射了 RShift:
~RShift::Send {LShift}
RShift UP::Send {Alt down}{LShift}{Alt up}
这里我已经将 RShift 重新映射到 ALT+SHIFT,但是当我按住 RShift ] 并输入它仍将照常执行的内容(将使其大写)。我唯一的问题是,当我释放它时,它仍然执行 ALT+SHIFT,如果我拿着它,我不希望它执行。
我看到一些解释说这是有可能的,但我就是找不到。 :)
谢谢!
这应该适合你,评论中的解释:
RShift::
Send, {LShift down} ; Send our Left Shift down
KeyWait, RShift ; Wait until Right Shift is released
If (A_TimeSinceThisHotkey < 500) { ; If RShift was released very quickly do below..
Send, {LSHift up} ; Release the initial Left Shift
Send {Alt down}{LShift}{Alt up} ; Send your sequence of keys
Return ; exit from Sub Routine
}
Else ; else if Right Was held longer than 500 milliseconds
Send, {LSHift up} ; Release the initial Left Shift
Return ; exit from Sub Routine