【问题标题】:AHK "$Alt & key" shortcut combo failingAHK "$Alt & key" 快捷键组合失败
【发布时间】:2023-03-10 05:30:01
【问题描述】:

在 AutoHotKey 中,我遇到了麻烦。我需要这个来工作:

$Alt & w::发送 ^w

我觉得这应该非常简单,但无论我如何尝试重新调整代码的快捷方式/热键端(例如 {$Alt}、${Alt} 等),它都会失败。

注意 1:我不能简单地使用“!w::Send ^w”,因为“alt”按键会触发程序(菜单?),这样它会关闭整个程序,而不仅仅是活动窗口。所以我需要那里的$。

注意 2:"$Alt" 本身可以正常工作,但与 "w" 键组合使用会失败。

【问题讨论】:

    标签: autohotkey


    【解决方案1】:
    #UseHook       ; Does the same thing as '$'
    SendMode Input
    !w::Send ^w    ; Don't use '&' with modifier keys like you did.
    

    如果 Alt 困扰你,也许这会有所帮助:

    ; Asterisks: fire hotkeys even if extra modifiers are being held down.
    *LAlt::return          ; Nothing happens when you press 'LAlt'.
    *LAlt Up::             ; On release it checks if the prior key was 'w'.
    If (A_PriorKey == "w") 
        Send ^w            ; If so, sends Control + W.
    else Send {LAlt}       ; If not, sends LAlt.
    return
    

    【讨论】:

      猜你喜欢
      • 2013-04-06
      • 2019-07-28
      • 1970-01-01
      • 2020-10-30
      • 1970-01-01
      • 2021-11-18
      • 2022-06-25
      • 1970-01-01
      • 2013-09-02
      相关资源
      最近更新 更多