Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ControlKeyStates Enumeration

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Defines the states of specific control keys, such as the ALT key, CTRL key, SCROLL key, and CAPSLOCK key.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:   System.Management.Automation.Host
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

[FlagsAttribute]
public enum ControlKeyStates

Member nameDescription
CapsLockOn

The CAPSLOCK key is turned on.

EnhancedKey

The key is enhanced.

LeftAltPressed

The left ALT key is pressed.

LeftCtrlPressed

The left CTRL key is pressed.

NumLockOn

The NUMLOCK key is turned on.

RightAltPressed

The right ALT key is pressed.

RightCtrlPressed

The right CTRL key is pressed.

ScrollLockOn

The SCROLLLOCK key is turned on.

ShiftPressed

The SHIFT key is pressed.

Return to top

Community Additions

Show: