按 ctrl+c 两次时接收 ctrl+x 的 AutoHotKey 代码

AutoHotKey code to receive ctrl+x while pressing ctrl+c twice

AutoHotKey 代码在按下 CTRL+[=16= 时接收 CTRL+X ]V两次

有人可以帮忙吗?

非常感谢!

假设我们谈论的是 Ctrl+C,而不是 V,并且假设您想保留原来的 Ctrl+C 功能,但也将它用于 Ctrl+X 短按两次时:

#persistent
Transform, cC, Chr, 3  ; store the value of ctrlC into cC.
hotkey, $^c, ctrlC, ON  ; this is basically the same as if to say $^c::..., but only deactivable
return

ctrlC:
    hotkey, $^c, ctrlC, OFF
    input, key, M L1 T0.2
    hotkey, $^c, ctrlC, ON

    if errorlevel = timeout
        send ^c
    else if key = %cC%
        send ^x
    else
        send %key%
return

应该做..

另请参阅 Input 了解更多信息。我使用了这个小热键命令技巧来暂时禁用 Ctrl+C-热键,否则 input 不会认识第二个c

在这个例子中,我将超时设置为 0.2 秒。改成你方便的。

关于您的 capslock 想法 - 我觉得是个好主意,但无论如何,我们不是代码提供者网络。命令 getKeyState 应该可以帮助您开始。