AutoHotKey - 如何多次发送控制和相同的密钥

AutoHotKey - how to send control and same key multiple times

具体我想按住control键,然后按m键,松开m但按住control,再按m,就会触发这个功能。更一般地说,我想知道告诉 autohotkey 多次读取同一个键的语法

我该怎么做?

像这样用一个m就可以了

^m::
  Send, The text i want to send
Return

到目前为止我已经试过了

^m m::
  Send, The text i want to send
Return

^m&m::
  Send, The text i want to send
Return

^mm::
  Send, The text i want to send
Return

所有这些都是非法的

这个怎么样:

; Depending on how many times a key combination was pressed, 
; execute different commands:

^m::
    ctrl_m_count++          ; start counter
    SetTimer ctrl_m_action, -50
return

ctrl_m_action:
    KeyWait, Ctrl
    If (ctrl_m_count = 1)
        MsgBox, ctrl_m_action 1
    If (ctrl_m_count = 2)
        MsgBox, ctrl_m_action 2
    ; ...
    ctrl_m_count := 0       ; reset  counter
return