Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

CoreWindow.GetKeyState(VirtualKey) Method

Definition

Namespace:
Windows.UI.Core

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Retrieves the state of a virtual key.

public:
 virtual CoreVirtualKeyStates GetKeyState(VirtualKey virtualKey) = GetKeyState;
CoreVirtualKeyStates GetKeyState(VirtualKey const& virtualKey);
public CoreVirtualKeyStates GetKeyState(VirtualKey virtualKey);
function getKeyState(virtualKey)
Public Function GetKeyState (virtualKey As VirtualKey) As CoreVirtualKeyStates

Parameters

virtualKey
VirtualKey

The virtual key for which state is returned.

Returns

The flags indicating the current state of the supplied virtual key when the input event fired.

Implements

Applies to

See also

  • <xref:Windows.UI.Core.CoreVirtualKeyStates%0a*+M%3aWindows.UI.Core.CoreWindow.GetAsyncKeyState(Windows.System.VirtualKey)%0a*+%5bInputKeyboardSource.GetKeyStateForCurrentThread%5d(%2fwindows%2fwindows-app-sdk%2fapi%2fwinrt%2fmicrosoft.ui.input.inputkeyboardsource.getkeystateforcurrentthread)>

Feedback

Was this page helpful?