使用autohotkey中的键发送现有修饰符?

Cia*_*tic 4 autohotkey

我正在尝试使用Send命令发送压缩修改器,只有我想出的方法是将它们全部列出:

; (Note: I've remapped using registry the Capslock as F13)
F13 & h::
    if GetKeyState("Control") && GetKeyState("Shift") {
        Send +^{Left}
        return
    }

    if GetKeyState("Control") {
        Send ^{Left}
        return
    }

    if GetKeyState("Shift") {
        Send +{Left}
        return
    }
    Send {Left}
    return
Run Code Online (Sandbox Code Playgroud)

在Windows中如果你按ctrl + left它会向左跳一个单词,如果按ctrl + shift + left它会向左选择一个单词.类似地,我想像上面的例子一样发送现有的修饰符,但是有更简单的方法吗?伪代码:F13 & h::Send {CurrentlyPressedModifiers}{Left}

Rob*_*ink 6

您可以使用Send,{Blind}模式执行此操作.例:

*a::Send, {Blind}{Left}
Run Code Online (Sandbox Code Playgroud)

*接受所有改性剂a和{盲}传递到修饰符Send命令.

或者,您可以避免发送和使用:

a::Left
Run Code Online (Sandbox Code Playgroud)

这里所有修饰符都自动传递给Left命令.

注意:据我在测试后看到,这两种解决方案都不适用于"您的"组合键,只能使用标准热键.

因此,除非您将组合键更改回标准热键,否则您的初始解决方案可能是唯一的解决方案.