ConsoleModifiers Enumeration


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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)

type ConsoleModifiers

Member nameDescription

The left or right ALT modifier key.


The left or right CTRL modifier key.


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