Table of Contents

Class KeysExtensions

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains static methods and properties related to the keyboard input handling, implements extension methods for input related enums and classes.

public static class KeysExtensions
Inheritance
KeysExtensions

Properties

KeyAndKeysMapping

Gets or sets Keys to/from Key enum mapping.

Methods

GetKeyCode(Keys)

Gets the keyboard code from Keys.

GetKeyValue(Keys)

Gets the keyboard value from Keys.

GetModifiers(Keys)

Gets the modifier flags from Keys. The flags indicate which combination of CTRL, SHIFT, and ALT keys was pressed.

HasAlt(ModifierKeys)

Gets whether the specified ModifierKeys value has Alt flag.

HasControl(ModifierKeys)

Gets whether the specified ModifierKeys value has Control flag.

HasShift(ModifierKeys)

Gets whether the specified ModifierKeys value has Shift flag.

HasWindows(ModifierKeys)

Gets whether the specified ModifierKeys value has Windows flag.

IsAlt(Keys)

Gets a value indicating whether the ALT key was pressed.

IsControl(Keys)

Gets a value indicating whether the CTRL key was pressed.

IsShift(Keys)

Gets a value indicating whether the SHIFT key was pressed.

RegisterKeyMappings()

Registers default Keys to/from Key enum mappings.

ToKey(Keys)

Converts Keys to Key.

ToKeys(Key, ModifierKeys)

Converts Key to Keys.

ToKeys(ModifierKeys)

Converts ModifierKeys to Keys.

ToModifiers(Keys)

Converts Keys to ModifierKeys.

ToRawModifierKeys(ModifierKeys)

Converts the specified ModifierKeys value to RawModifierKeys value.