New to Telerik UI for WPFStart a free 30-day trial

This class presents a way to query the state of the various keyboard modifier keys. It also allows you to check the state of the shortcut key for the current platform.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public static class KeyboardModifiers

Inheritance: objectKeyboardModifiers

Properties

Gets a value indicating whether the Alt key is pressed.

C#
public static bool IsAltDown { get; }
Property Value:

true if the Alt key is pressed; otherwise, false.

Gets a value indicating whether the Apple (Command) key is pressed.

C#
public static bool IsCommandDown { get; }
Property Value:

true if the Apple (Command) key is pressed; otherwise, false.

Remarks:

This is only applicable on Silverlight under Mac OS X.

Gets a value indicating whether the Control key is pressed.

C#
public static bool IsControlDown { get; }
Property Value:

true if the Control key is pressed; otherwise, false.

Gets a value indicating whether the Shift key is pressed.

C#
public static bool IsShiftDown { get; }
Property Value:

true if the Shift key is pressed; otherwise, false.

Gets a value indicating whether the platform-specific shortcut meta key is pressed.

C#
public static bool IsShortcutKeyDown { get; }
Remarks:

For most systems (Windows + Linux) the shortcut key is Control. However, under Mac OS X the shortcut key is Apple (Command). Note that you still have to know if the relevant shortcut on Mac uses Command, because it can be entirely different.

Modifiers

ModifierKeys

Gets the keyboard modifier keys.

C#
public static ModifierKeys Modifiers { get; }