单键切换切换

Toggle Shift for Single Keypress

我正在尝试将我的 shift 键变成某种 CapsLock。目标是,当按下 Shift 键时,它会移动下一个要按下的键(无需按住 shift 键),类似于 StickyKeys 的功能,但仅适用于 Shift 键。我可以使用以下方式切换 Shift 键:

LShift:: Send % "{Blind}{LShift " . ((lshift:=!lshift) ? "Down}" : "Up}")

但这需要我再次按下 Shift 键,基本上将其变成 CapsLock。我怎样才能让这个动作只持续一次按键?

应该这样做:

$LShift:: 
    SendInput, {LShift Down}
    KeyWait, LShift
    SendInput, {LShift Down}
    Input, Key, L1 V
    SendInput, {LShift Up}
Return

编辑:

$*LShift:: 
    SendInput, {LShift Down}
    Input, Key, L1 M V
    If GetKeyState("LShift", "P")
        KeyWait, LShift
    SendInput, {LShift Up}
Return