Share via


VirtualKeyStates Enum

Definition

Specifies the possible states of a virtual-key.

This enumeration supports a bitwise combination of its member values.

public enum class VirtualKeyStates
/// [System.Flags]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65540)]
enum class VirtualKeyStates
[System.Flags]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65540)]
public enum VirtualKeyStates
var value = Microsoft.UI.Input.VirtualKeyStates.none
Public Enum VirtualKeyStates
Inheritance
VirtualKeyStates
Attributes

Fields

Name Value Description
None 0

The key is up or in no specific state.

Down 1

The key is pressed down.

Locked 2

The key is in a toggled or modified state (for example, Caps Lock).

Note

All keys support the Locked state (not just the standard Caps Lock and Num Lock keys).

Remarks

The keyboard device driver receives scan codes from the keyboard and interprets and translates (maps) them into virtual-key codes (device-independent values defined by the system to identify the purpose of a key).

Applies to

See also