Getkeystate P mode inquiry

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
helming
Posts: 25
Joined: 07 Dec 2016, 15:01

Getkeystate P mode inquiry

17 Nov 2017, 16:09

Hello, I've come across this problem.

Code: Select all

n::
KeyDown2 := !KeyDown2
If KeyDown2
	Send {y down}
Else
	Send {y up}
Return

w::
kstate := GetKeyState("y", "P")
Msgbox, %kstate%
Return
When I press y and w, msgbox reads 1. I press just w, it reads 0.
If I press w after n(without touching y), msgbox reads 1. Getkeystate mode is p, so I guess it should reads 0 not 1.
Did I mess up something?

Thanks in advance.
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Getkeystate P mode inquiry

17 Nov 2017, 16:13

Try to install the keyboard hook
helming
Posts: 25
Joined: 07 Dec 2016, 15:01

Re: Getkeystate P mode inquiry

20 Nov 2017, 00:20

I thought running another script which install keyboard hook is sufficient. Well, apparently I was wrong. Thank you so much Helgef

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Lamron750, mikeyww and 228 guests