Core Function RealGetKeyState

From Sputnik Wiki
Revision as of 08:44, 27 April 2012 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
RealGetKeyState( <vk_keycode> )

Contents

Description

Checks if a key is pressed down.

Parameters

vk_keycode

A virtual key code (See Macros).

Return Value

None

Remarks

None.

Example

println("Try pressing B or C or Shift+A or Shift+Control+D or Shift+Control+Alt+E");
while(true)
{
	if( RealGetKeyState(@KeyB) )
	{
		println("B is pressed");
	}
	if( RealGetKeyState(@KeyC) )
	{
		println("C is pressed");
	}
	if( 	RealGetKeyState(@KeyShiftKey) &&
		RealGetKeyState(@KeyA)
		)
	{
		println("Shift+A is pressed");
	}
	if( 	RealGetKeyState(@KeyShiftKey) &&
		RealGetKeyState(@KeyControlKey) &&
		RealGetKeyState(@KeyD)
		)
	{
		println("Shift+Control+D is pressed");
	}
	if( 	RealGetKeyState(@KeyShiftKey) &&
		RealGetKeyState(@KeyControlKey) &&
		RealGetKeyState(@KeyMenu) &&
		RealGetKeyState(@KeyE)
		)
	{
		println("Shift+Control+Alt+E is pressed");
	}
	sleep(100);
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox