This is a light Autohotkey library for creating and recognizing mouse gestures. It helps you to customize any one-stroke pattern and bind it to any function.
It can accurately recognize complex patterns, including straight lines, arcs, and polylines. So you can draw L, O, M, U, Z, and even a star shape on the screen to do whatever you want.
The guide and source code are available at https://github.com/Tebayaki/HotGestures.
Demo
This example creates 3 gestures for notepad. Left-slide to backspace, right-slide to wrap, and circle to select all.
Code: Select all
; A left slide gesture
leftSlide := HotGestures.Gesture("←:-1,0")
; Create A right slide gesture
rightSlide := HotGestures.Gesture("→:1,0")
; A O-Shape gesture
circle := HotGestures.Gesture("O:-20,0|-20,3|-19,5|-19,7|-18,10|-16,12|-15,14|-13,15|-11,17|-9,18|-6,19|-4,20|-1,20|1,20|4,20|6,19|9,18|11,17|13,15|15,14|16,12|18,10|19,7|19,5|20,3|20,0|20,-3|19,-5|19,-7|18,-10|16,-12|15,-14|13,-15|11,-17|9,-18|6,-19|4,-20|1,-20|-1,-20|-4,-20|-6,-19|-9,-18|-11,-17|-13,-15|-15,-14|-16,-12|-18,-10|-19,-7|-19,-5|-20,-3")
hgs := HotGestures()
hgs.Register(leftSlide, "Backspace", _ => Send("{BackSpace}"))
hgs.Register(rightSlide, "Wrap", _ => Send("{Enter}"))
hgs.Register(circle, "Select All", _ => Send("^a"))
HotIfWinactive("ahk_class Notepad")
hgs.Hotkey("RButton")
HotIfWinactive()