Windows desktop applications
Collapse the table of content
Expand the table of content
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.

KeyInfo Structure

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Represents key information such as the character, virtual key code, the state of any associated control keys, and the state of the key (down).

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

public value struct KeyInfo

NameDescription
System_CAPS_pubmethodKeyInfo(Int32, Char, ControlKeyStates, Boolean)

Creates a new KeyInfo object that contains the virtual key code, the character, control key state, and a Boolean value that indicates whether the key is in the down (or pressed) state.

NameDescription
System_CAPS_pubpropertyCharacter

Gets or sets the character of the key.

System_CAPS_pubpropertyControlKeyState

Gets and sets the state of the control keys that are associated with the key.

System_CAPS_pubpropertyKeyDown

Gets or sets a Boolean value that indicates that the key is in the down (or pressed) position.

System_CAPS_pubpropertyVirtualKeyCode

Gets or sets the virtual key code that identifies the key.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether the current KeyInfo structure is equal to the specified object.(Overrides ValueType::Equals(Object^).)

System_CAPS_pubmethodGetHashCode()

Gets a hash code for the current KeyInfo structure.(Overrides ValueType::GetHashCode().)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

Converts the current KeyInfo structure to a string.(Overrides ValueType::ToString().)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(KeyInfo, KeyInfo)

Compares two KeyInfo structures to determine whether their respective character, virtual key code, control key state, and down position values are equal.

System_CAPS_puboperatorSystem_CAPS_staticInequality(KeyInfo, KeyInfo)

Compares two KeyInfo structures to determine whether their respective character, virtual key code, control key state, and down position values are not equal.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft