itenium-be / Mi-Ke

Collection of Autohotkey scripts to make daily life in Windows less dull
https://itenium.be/Mi-Ke/
MIT License
19 stars 4 forks source link

Advanced hotkeys (morse) #23

Closed Laoujin closed 6 years ago

Laoujin commented 6 years ago

https://autohotkey.com/board/topic/15574-morse-find-hotkey-press-and-hold-patterns/

Morse(timeout = 400) { ;
   tout := timeout/1000
   key := RegExReplace(A_ThisHotKey,"[\*\~\$\#\+\!\^]")
   Loop {
      t := A_TickCount
      KeyWait %key%
      Pattern .= A_TickCount-t > timeout
      KeyWait %key%,DT%tout%
      If (ErrorLevel)
         Return Pattern
   }
}

BS::MsgBox % "Morse press pattern " Morse()

!z::
   p := Morse()
   If (p = "0")
      MsgBox Short press
   Else If (p = "00")
      MsgBox Two short presses
   Else If (p = "01")
      MsgBox Short+Long press
   Else
      MsgBox Press pattern %p%
Return
Laoujin commented 6 years ago

https://github.com/lydell/dual Dual is an AutoHotkey script that lets you define dual-role modifier keys easily.

Laoujin commented 6 years ago

https://github.com/babin101/DevKeyboard Longer keypress results in a different char being displayed

Laoujin commented 6 years ago

configure 2x shift Capslock configure nextHotkey? (A_PRIORHOTKEY, ...)

Laoujin commented 6 years ago

https://github.com/russelldavis/AutoHotkey-Scripts/blob/master/AutoHotkey.ahk (handleHotkeyCombo)

Laoujin commented 6 years ago

See also: https://itenium.be/blog/productivity/autohotkey-hotkeys/

Laoujin commented 6 years ago

https://autohotkey.com/boards/viewtopic.php?f=6&t=303&sid=4f44b6b191c1f6fe0df4f93944c39aa6 https://github.com/maestrith/GUI_Creator