Class KeyboardHelper
Provides helper methods for the keyboard input.
Inheritance
Inherited Members
Namespace: Telerik.WinForms.Controls.Spreadsheet.Utilities
Assembly: Telerik.WinControls.RadSpreadsheet.dll
Syntax
public static class KeyboardHelper
Methods
AddModifier(ModifierKeys, ModifierKeys)
Adds modifier to the key modifiers.
Declaration
public static ModifierKeys AddModifier(ModifierKeys modifiers, ModifierKeys modifier)
Parameters
System.Windows.Input.ModifierKeys
modifiers
The key modifiers. |
System.Windows.Input.ModifierKeys
modifier
The modifier to add. |
Returns
System.Windows.Input.ModifierKeys
The result key modifiers. |
GetModifierKeyForEnter()
Gets the modifier key for Enter.
Declaration
public static ModifierKeys GetModifierKeyForEnter()
Returns
System.Windows.Input.ModifierKeys
The modifier key for Enter. |
IsAltPressed()
Determines whether alt key is pressed.
Declaration
public static bool IsAltPressed()
Returns
System.Boolean
|
IsCtrlKey(Keys)
Determines whether the given key is CTRL.
Declaration
public static bool IsCtrlKey(Keys key)
Parameters
System.Windows.Forms.Keys
key
The key to be checked. |
Returns
System.Boolean
|
IsCtrlOrMacPressed()
Determines whether CTRL or Mac is pressed.
Declaration
public static bool IsCtrlOrMacPressed()
Returns
System.Boolean
|
IsKeyboardFocusWithin()
Determines whether keyboard focus is within the current UI element.
Declaration
public static bool IsKeyboardFocusWithin()
Returns
System.Boolean
|
IsModifierPressed(ModifierKeys)
Determines whether modifier keys are pressed.
Declaration
public static bool IsModifierPressed(ModifierKeys modifier)
Parameters
System.Windows.Input.ModifierKeys
modifier
The modifier keys to look for. |
Returns
System.Boolean
|
IsModifierPressed(ModifierKeys, ModifierKeys)
Determines whether modifier keys are pressed.
Declaration
public static bool IsModifierPressed(ModifierKeys modifiers, ModifierKeys modifier)
Parameters
System.Windows.Input.ModifierKeys
modifiers
The modifier keys to check if modifier is contained. |
System.Windows.Input.ModifierKeys
modifier
The modifier. |
Returns
System.Boolean
|
IsShiftKey(Keys)
Determines whether the key is Shift key.
Declaration
public static bool IsShiftKey(Keys key)
Parameters
System.Windows.Forms.Keys
key
The key to be checked. |
Returns
System.Boolean
|
IsShiftPressed()
Determines whether shift key is pressed.
Declaration
public static bool IsShiftPressed()
Returns
System.Boolean
|
IsShiftPressed(ModifierKeys)
Determines whether shift key is pressed.
Declaration
public static bool IsShiftPressed(ModifierKeys modifiers)
Parameters
System.Windows.Input.ModifierKeys
modifiers
The modifier keys to check if shift key is contained. |
Returns
System.Boolean
|
RemoveModifier(ModifierKeys, ModifierKeys)
Removes key modifier from key modifiers.
Declaration
public static ModifierKeys RemoveModifier(ModifierKeys modifiers, ModifierKeys modifier)
Parameters
System.Windows.Input.ModifierKeys
modifiers
The key modifiers. |
System.Windows.Input.ModifierKeys
modifier
The modifier to remove. |
Returns
System.Windows.Input.ModifierKeys
The result key modifiers. |