Back to Adaptive Vision Library website

You are here: Start » Function Reference » User Input » GetKeyboardKeyState

GetKeyboardKeyState


Header:STD.h
Namespace:avl

Checks if the specified keyboard key is down and if it is toggled.

Syntax

void avl::GetKeyboardKeyState
(
	const int inKeyCode,
	bool& outIsDown,
	bool& outIsToggled
)

Parameters

Name Type Default Description
inKeyCode const int Virtual key code. See documentation for a complete table.
outIsDown bool& Informs if the specified keyboard key is being pressed at the moment.
outIsToggled bool& Informs about the state. Important for keys such as CapsLock.

Remarks

For complete list of virtual key codes, please follow the link below:
https://docs.microsoft.com/windows/desktop/inputdev/virtual-key-codes

See Also

  • GetKeyboardKeys – Returns virtual key codes of the pressed keys or NULL if no key was pressed.