Class
KeyboardHelper

Provides helper methods for the keyboard input.

Definition

Namespace:Telerik.Windows.Controls.Spreadsheet.Utilities

Assembly:Telerik.Windows.Controls.Spreadsheet.dll

Syntax:

cs-api-definition
public static class KeyboardHelper

Inheritance: objectKeyboardHelper

Methods

AddModifier(ModifierKeys, ModifierKeys)

Adds modifier to the key modifiers.

Declaration

cs-api-definition
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

cs-api-definition
public static ModifierKeys GetModifierKeyForEnter()

Returns

ModifierKeys

The modifier key for Enter.

IsAltPressed()

Determines whether alt key is pressed.

Declaration

cs-api-definition
public static bool IsAltPressed()

Returns

bool

True if ALT key is pressed.

IsCtrlKey(Key)

Determines whether the given key is CTRL.

Declaration

cs-api-definition
public static bool IsCtrlKey(Key key)

Parameters

key

Key

The key to be checked.

Returns

bool

True if the key is CTRL.

IsCtrlOrMacPressed()

Determines whether CTRL or Mac is pressed.

Declaration

cs-api-definition
public static bool IsCtrlOrMacPressed()

Returns

bool

True if CTRL or Mac is pressed.

IsKeyboardFocusWithin(UIElement)

Determines whether keyboard focus is within the current UI element.

Declaration

cs-api-definition
public static bool IsKeyboardFocusWithin(this UIElement element)

Parameters

element

UIElement

The element.

Returns

bool

True if the focus is within the current UI element.

IsModifierPressed(ModifierKeys)

Determines whether modifier keys are pressed.

Declaration

cs-api-definition
public static bool IsModifierPressed(ModifierKeys modifier)

Parameters

modifier

ModifierKeys

The modifier keys to look for.

Returns

bool

True if modifier keys are pressed.

IsModifierPressed(ModifierKeys, ModifierKeys)

Determines whether modifier keys are pressed.

Declaration

cs-api-definition
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

bool

True if modifier key is pressed.

IsShiftKey(Key)

Determines whether the key is Shift key.

Declaration

cs-api-definition
public static bool IsShiftKey(Key key)

Parameters

key

Key

The key to be checked.

Returns

bool

True if the key is Shift.

IsShiftPressed()

Determines whether shift key is pressed.

Declaration

cs-api-definition
public static bool IsShiftPressed()

Returns

bool

True if shift key is pressed.

IsShiftPressed(ModifierKeys)

Determines whether shift key is pressed.

Declaration

cs-api-definition
public static bool IsShiftPressed(ModifierKeys modifiers)

Parameters

modifiers

ModifierKeys

The modifier keys to check if shift key is contained.

Returns

bool

True if shift is pressed.

RemoveModifier(ModifierKeys, ModifierKeys)

Removes key modifier from key modifiers.

Declaration

cs-api-definition
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.