;// This is the "back" button ... ;// Keywait waits max 210ms for key release. ;// IF: (keywait < 200ms) -> send the actual button, IF: (keywait > 200ms (or timeout)) -> send key PageUp. XButton1:: x:=A_TickCount Keywait XButton1, T0.21 d:=(A_TickCount-x) If (d<200) Send {XButton1} Else Send {PgUp} Return ;// This is the "forward"-button ... ;// Keywait waits max 210ms for key release. ;// IF: (keywait < 200ms) -> send the actual button, IF: (keywait > 200ms (or timeout)) -> press the 1-button down, repeat. XButton2:: x:=A_TickCount Keywait XButton2, T0.21 d:=(A_TickCount-x) If (d<200) Send {Xbutton2} Else Send {1 Down} Return ;// When "forward" is released, the 1-button is released ... XButton2 Up:: Send {1 Up} Return
Labels
- linux (21)
- script (15)
- css (12)
- bash (9)
- cli (9)
- customize (8)
- stylish (7)
- windows (6)
- firefox (5)
- userchrome.css (5)
- xbmc (5)
- ahk (3)
- autohotkey (3)
- command line (3)
- tt-rss (3)
- ubuntu (3)
- SQL (2)
- automation (2)
- batch (2)
- config (2)
- google reader (2)
- javascript (2)
- mpd (2)
- photos (2)
- spotify (2)
- virtualbox (2)
- API (1)
- GW2 (1)
- Guild Wars 2 (1)
- SQL Server (1)
- android (1)
- animals (1)
- arch linux (1)
- backup (1)
- bukkit (1)
- c# (1)
- cross browser (1)
- curl (1)
- debian (1)
- deluge (1)
- ext.net (1)
- facebook (1)
- flexget (1)
- flowers (1)
- gentoo (1)
- greasemonkey (1)
- kodi (1)
- openbox (1)
- pidgin (1)
- python (1)
- raspberry (1)
- rpi (1)
- scriptish (1)
- tasker (1)
- tellstick (1)
- tmux (1)
- update (1)
- video (1)
- youtube (1)
Wednesday, May 12, 2021
Autohotkey, mouse button different action, click vs hold
Subscribe to:
Posts (Atom)