Class KeyboardHelper
Provides helper methods for the keyboard input.
Inheritance
Namespace: Telerik.Windows.Controls.Spreadsheet.Utilities
Assembly: Telerik.Windows.Controls.Spreadsheet.dll
Syntax
public static class KeyboardHelper : Object
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(Key)
Determines whether the given key is CTRL.
Declaration
public static bool IsCtrlKey(Key key)
Parameters
System.Windows.Input.Key
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(UIElement)
Determines whether keyboard focus is within the current UI element.
Declaration
public static bool IsKeyboardFocusWithin(this UIElement element)
Parameters
System.Windows.UIElement
element
The element. |
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(Key)
Determines whether the key is Shift key.
Declaration
public static bool IsShiftKey(Key key)
Parameters
System.Windows.Input.Key
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. |