使用自动快捷键发送现有修饰符? [英] Send existing modifiers with a key in autohotkey?

查看:71
本文介绍了使用自动快捷键发送现有修饰符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用发送"命令发送按下的修饰符,我想出的唯一方法是列出所有修饰符:

I'm trying to send pressed modifiers with the Send command, only way I come up with is listing them all:

; (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

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

In Windows if you press ctrl+left it jumps a word left, if I press ctrl+shift+left it selects a word leftwise. Similarily I'd like to send the existing modifiers as in above example, but is there a simpler way? Pseudocode: F13 & h::Send {CurrentlyPressedModifiers}{Left}

推荐答案

您可以使用发送{Blind}"模式执行此操作.示例:

You can do this with the Send, {Blind} mode. Example:

*a::Send, {Blind}{Left}

*接受 a 的所有修饰符,而{Blind}将修饰符传递给Send命令.

The * accepts all modifiers for a and {Blind} passes the modifiers on to the Send command.

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

Alternatively, you can avoid Send and use:

a::Left

所有修饰符会自动传递给Left命令.

Here all modifiers are automatically passed on to the Left command.

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

So your initial solution might be the only one, unless you change the combination keys back to standard hotkeys.

这篇关于使用自动快捷键发送现有修饰符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆