"InputHook()" for mouse?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
madsounds
Posts: 59
Joined: 31 May 2019, 08:14

"InputHook()" for mouse?

Post by madsounds » 31 Mar 2021, 21:34

Is it possible to use method, simiar to InputHook(), for the mouse?

E.g.:

Code: Select all

hook := InputHook()
hook.OnKeyDown := Func( "OnKeyDown" )
hook.KeyOpt( "{LButton}{RButton}{XButton2}{WheelDown}", "+N" )
hook.Start()

OnKeyDown( hk, vk, sc )
{
	switch vk
	{
		case 12345:
			;Code for LButton
		case 123134:
			;Code for RButton
		case 879487:
			Code for XButton2
		case 433873:
			Code for WheelDown
	}
}

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: "InputHook()" for mouse?

Post by swagfag » 03 May 2021, 17:45

no, use regular hotkeys if u need to suppress or use a Low Level Mouse Hook if u dont
or if u really want the InputHook's API, then ull have to probably reimplement it urself using both

Post Reply

Return to “Ask for Help (v2)”