AutoHotKey - 带箭头键的 LShift 和 RShift,无法按预期工作

AutoHotKey - LShift and RShift with arrow key, not working as I expected

>+Right::
    Send % GetKeyState("LShift", "p") ? "+{End}" : "{End}"
    return

上面的代码是我尝试实现的(但失败了)。
但是,作为测试之一的下面的代码可以工作......但不如我预期的那么顺利。

*Right::
    If (GetKeyState("RShift", "p") && GetKeyState("LShift", "p"))
        MsgBox Both Shift Keys
    Else
        MsgBox meh
    return

它有一些延迟,有时不显示任何内容。这太奇怪了。

这可能是制造商的问题,但我想确定一下。任何优雅的解决方案来实现第一个代码?

看来这个简单的东西就是你要找的东西:

+<>+Right::End
>+Right::SendInput, {End}

它使用的是简单的 remapping syntax and your shift key gets passed through because the remapping syntax internally uses {Blind}

并且第二个热键没有使用重映射语法,而只是一个普通的发送命令,所以 shift 键将被消耗。


第一个选项出于某种原因在 OP 端不起作用后的另一个选项?

>+Right::
+<>+Right::SendInput, % (InStr(A_ThisHotkey, "+<") ? "+" : "") "{End}"

因为你那里也有很酷的三元组,所以我也把它放了进去。该代码与此相同:

>+Right::SendInput, {End}
+<>+Right::SendInput, +{End}