Volume Control
Application-specific hotkeys for Windows
VolumeControl.Core.Extensions.KeyboardDeviceExtensions Class Reference

Extension methods for the KeyboardDevice class. More...

Collaboration diagram for VolumeControl.Core.Extensions.KeyboardDeviceExtensions:

Static Public Member Functions

static bool IsModifierKeyDown (this KeyboardDevice keyboard, EModifierKey modifierKey)
 Checks if the specified modifierKey is currently pressed on this keyboard device. More...
 
static bool IsAnyModifierKeyDown (this KeyboardDevice keyboard)
 Checks if any modifier keys are pressed. More...
 

Detailed Description

Extension methods for the KeyboardDevice class.

Member Function Documentation

◆ IsAnyModifierKeyDown()

static bool VolumeControl.Core.Extensions.KeyboardDeviceExtensions.IsAnyModifierKeyDown ( this KeyboardDevice  keyboard)
static

Checks if any modifier keys are pressed.

Parameters
keyboard(implicit) KeyboardDevice to check.
Returns
true when at least one modifier key is pressed; otherwise false.

◆ IsModifierKeyDown()

static bool VolumeControl.Core.Extensions.KeyboardDeviceExtensions.IsModifierKeyDown ( this KeyboardDevice  keyboard,
EModifierKey  modifierKey 
)
static

Checks if the specified modifierKey is currently pressed on this keyboard device.

When modifierKey is EModifierKey.None, returns true when no modifier keys are pressed.

Parameters
keyboard(implicit) KeyboardDevice to check.
modifierKeyThe EModifierKey to check.
Returns
true when the specified modifier key is pressed; otherwise false.
Exceptions
InvalidOperationExceptionmodifierKey was EModifierKey.NoRepeat.
InvalidEnumArgumentExceptionmodifierKey was not a valid single EModifierKey value.

The documentation for this class was generated from the following file: