ConsoleModifiers Enumeration

 

Represents the SHIFT, ALT, and CTRL modifier keys on a keyboard.

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

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

[<SerializableAttribute>]
[<FlagsAttribute>]
type ConsoleModifiers

Member nameDescription
Alt

The left or right ALT modifier key.

Control

The left or right CTRL modifier key.

Shift

The left or right SHIFT modifier key.

No distinction is made between the left or right SHIFT, ALT, and CTRL keys.

The ConsoleModifiers enumeration is used in conjunction with the ConsoleKeyInfo type.

The following code example reads a key and determines whether one or more modifier keys was pressed.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: