KeyboardHelper
Provides helper methods for the keyboard input.
Definition
Namespace:Telerik.Windows.Controls.Spreadsheet.Utilities
Assembly:Telerik.Windows.Controls.Spreadsheet.dll
Syntax:
public static class KeyboardHelper
Inheritance: objectKeyboardHelper
Methods
Adds modifier to the key modifiers.
public static ModifierKeys AddModifier(ModifierKeys modifiers, ModifierKeys modifier)
The key modifiers.
modifierModifierKeysThe modifier to add.
Returns:ModifierKeys
The result key modifiers.
Gets the modifier key for Enter.
public static ModifierKeys GetModifierKeyForEnter()
ModifierKeys
The modifier key for Enter.
Determines whether alt key is pressed.
Determines whether the given key is CTRL.
public static bool IsCtrlKey(Key key)
The key to be checked.
Returns:True if the key is CTRL.
Determines whether CTRL or Mac is pressed.
Determines whether keyboard focus is within the current UI element.
public static bool IsKeyboardFocusWithin(this UIElement element)
The element.
Returns:True if the focus is within the current UI element.
Determines whether modifier keys are pressed.
public static bool IsModifierPressed(ModifierKeys modifiers, ModifierKeys modifier)
The modifier keys to check if modifier is contained.
modifierModifierKeysThe modifier.
Returns:True if modifier key is pressed.
Determines whether modifier keys are pressed.
public static bool IsModifierPressed(ModifierKeys modifier)
The modifier keys to look for.
Returns:True if modifier keys are pressed.
Determines whether the key is Shift key.
public static bool IsShiftKey(Key key)
The key to be checked.
Returns:True if the key is Shift.
Determines whether shift key is pressed.
Determines whether shift key is pressed.
public static bool IsShiftPressed(ModifierKeys modifiers)
The modifier keys to check if shift key is contained.
Returns:True if shift is pressed.
Removes key modifier from key modifiers.
public static ModifierKeys RemoveModifier(ModifierKeys modifiers, ModifierKeys modifier)
The key modifiers.
modifierModifierKeysThe modifier to remove.
Returns:ModifierKeys
The result key modifiers.