ToolStripManager.IsValidShortcut Method (Keys)


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

Retrieves a value indicating whether a defined shortcut key is valid.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static bool IsValidShortcut(
	Keys shortcut


Type: System.Windows.Forms.Keys

The shortcut key to test for validity.

Return Value

Type: System.Boolean

true if the shortcut key is valid; otherwise, false.

Valid shortcut keys are the function keys F1 through F12 alone; function keys with CTRL, ALT, or SHIFT modifiers; or other keys with CTRL, ALT, or SHIFT modifiers. CTRL, ALT, or SHIFT keys and keys other than function keys are not valid shortcut keys if used alone.

.NET Framework
Available since 2.0
Return to top