Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

If GetKeyState("NumpadLeft","P")


  • Please log in to reply
2 replies to this topic
shirai
  • Guests
  • Last active:
  • Joined: --
a::
While GetKeyState("a","P") = 1
	{
		If GetKeyState("NumpadLeft","P") = 1 ;
		{
			ToolTip,4
		}
	}
return

This code

press NumpadLeft
Display ToolTip,4

press Left
Display ToolTip,4

It doesn't diverge of pushing.

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
What he means is that the Tooltip shows if you press "Left" instead of "NumpadLeft" (while holding "a", of course).
a::
  While GetKeyState("a","P")
    If GetKeyState("NumpadLeft","P")
      ToolTip, 4
Return
I was able to reproduce this behaviour.
WinXP SP3
AHK 1.0.48.05 (Basic)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
I've added the following to the AutoHotkey_L documentation:

Known limitation: This function cannot differentiate between two keys which share the same virtual key code, such as Left and NumpadLeft.