ClassKeyboardHelper
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
AddModifier(ModifierKeys, ModifierKeys)
Adds modifier to the key modifiers.
Declaration
public static ModifierKeys AddModifier(ModifierKeys modifiers, ModifierKeys modifier)
Parameters
modifiers
ModifierKeys
The key modifiers.
modifier
ModifierKeys
The modifier to add.
Returns
ModifierKeys
The result key modifiers.
GetModifierKeyForEnter()
Gets the modifier key for Enter.
Declaration
public static ModifierKeys GetModifierKeyForEnter()
Returns
ModifierKeys
The modifier key for Enter.
IsAltPressed()
Determines whether alt key is pressed.
Declaration
public static bool IsAltPressed()
Returns
True if ALT key is pressed.
IsCtrlKey(Key)
Determines whether the given key is CTRL.
Declaration
public static bool IsCtrlKey(Key key)
Parameters
key
Key
The key to be checked.
Returns
True if the key is CTRL.
IsCtrlOrMacPressed()
Determines whether CTRL or Mac is pressed.
Declaration
public static bool IsCtrlOrMacPressed()
Returns
True if CTRL or Mac is pressed.
IsKeyboardFocusWithin(UIElement)
Determines whether keyboard focus is within the current UI element.
Declaration
public static bool IsKeyboardFocusWithin(this UIElement element)
Parameters
element
UIElement
The element.
Returns
True if the focus is within the current UI element.
IsModifierPressed(ModifierKeys)
Determines whether modifier keys are pressed.
Declaration
public static bool IsModifierPressed(ModifierKeys modifier)
Parameters
modifier
ModifierKeys
The modifier keys to look for.
Returns
True if modifier keys are pressed.
IsModifierPressed(ModifierKeys, ModifierKeys)
Determines whether modifier keys are pressed.
Declaration
public static bool IsModifierPressed(ModifierKeys modifiers, ModifierKeys modifier)
Parameters
modifiers
ModifierKeys
The modifier keys to check if modifier is contained.
modifier
ModifierKeys
The modifier.
Returns
True if modifier key is pressed.
IsShiftKey(Key)
Determines whether the key is Shift key.
Declaration
public static bool IsShiftKey(Key key)
Parameters
key
Key
The key to be checked.
Returns
True if the key is Shift.
IsShiftPressed()
Determines whether shift key is pressed.
Declaration
public static bool IsShiftPressed()
Returns
True if shift key is pressed.
IsShiftPressed(ModifierKeys)
Determines whether shift key is pressed.
Declaration
public static bool IsShiftPressed(ModifierKeys modifiers)
Parameters
modifiers
ModifierKeys
The modifier keys to check if shift key is contained.
Returns
True if shift is pressed.
RemoveModifier(ModifierKeys, ModifierKeys)
Removes key modifier from key modifiers.
Declaration
public static ModifierKeys RemoveModifier(ModifierKeys modifiers, ModifierKeys modifier)
Parameters
modifiers
ModifierKeys
The key modifiers.
modifier
ModifierKeys
The modifier to remove.
Returns
ModifierKeys
The result key modifiers.