Volume Control
Application-specific hotkeys for Windows
VolumeControl.Core.Input.Json.JsonHotkey Struct Reference

Contains the JSON object representation of a Hotkey instance. More...

Collaboration diagram for VolumeControl.Core.Input.Json.JsonHotkey:

Public Member Functions

 JsonHotkey (IHotkey hotkey)
 Creates a new JsonHotkey instance using the specified hotkey . More...
 
 JsonHotkey ()
 Creates a new JsonHotkey instance with default values. More...
 
THotkey CreateInstance< THotkey > (HotkeyActionManager actionManager, bool deferRegistration=false)
 Creates a new THotkey instance from this JsonHotkey struct, using the specified actionManager to resolve the ActionIdentifier. More...
 

Properties

string Name = string.Empty [get, set]
 
EFriendlyKey Key = EFriendlyKey.None [get, set]
 
EModifierKey Modifiers = EModifierKey.None [get, set]
 
bool IsRegistered = false [get, set]
 
string? ActionIdentifier = null [get, set]
 Gets or sets the Identifier string of this hotkey's action. More...
 
Dictionary< string, JsonActionSettingValue >? ActionSettings = null [get, set]
 Gets or sets the action settings dictionary containing the action settings for this hotkey's action. More...
 

Detailed Description

Contains the JSON object representation of a Hotkey instance.

Constructor & Destructor Documentation

◆ JsonHotkey() [1/2]

◆ JsonHotkey() [2/2]

VolumeControl.Core.Input.Json.JsonHotkey.JsonHotkey ( )

Creates a new JsonHotkey instance with default values.

Member Function Documentation

◆ CreateInstance< THotkey >()

THotkey VolumeControl.Core.Input.Json.JsonHotkey.CreateInstance< THotkey > ( HotkeyActionManager  actionManager,
bool  deferRegistration = false 
)

Creates a new THotkey instance from this JsonHotkey struct, using the specified actionManager to resolve the ActionIdentifier.

Template Parameters
THotkeyA hotkey type that derives from Hotkey.
Parameters
actionManagerA HotkeyActionManager instance to use to resolve the ActionIdentifier.
deferRegistrationWhen true, the created hotkey is not registered even if it should be.
Returns
A new THotkey instance.
Exceptions
InvalidOperationExceptionCreating an instance of type THotkey failed.
Type Constraints
THotkey :Hotkey 

References VolumeControl.Core.Input.Hotkey.Action, VolumeControl.Core.Input.Json.JsonHotkey.ActionIdentifier, VolumeControl.Core.Input.Json.JsonHotkey.ActionSettings, VolumeControl.Log.FLog.Error(), VolumeControl.Log.FLog.FilterEventType(), VolumeControl.Core.Input.Actions.HotkeyActionManager.FindActionDefinition(), VolumeControl.Core.Input.Json.JsonHotkey.IsRegistered, VolumeControl.Core.Input.Json.JsonHotkey.Key, VolumeControl.Core.Input.Json.JsonHotkey.Modifiers, and VolumeControl.Core.Input.Json.JsonHotkey.Name.

Here is the call graph for this function:

Property Documentation

◆ ActionIdentifier

string? VolumeControl.Core.Input.Json.JsonHotkey.ActionIdentifier = null
getset

Gets or sets the Identifier string of this hotkey's action.

Referenced by VolumeControl.Core.Input.Json.JsonHotkey.CreateInstance< THotkey >(), and VolumeControl.Core.Input.Json.JsonHotkey.JsonHotkey().

◆ ActionSettings

Dictionary<string, JsonActionSettingValue>? VolumeControl.Core.Input.Json.JsonHotkey.ActionSettings = null
getset

Gets or sets the action settings dictionary containing the action settings for this hotkey's action.

Referenced by VolumeControl.Core.Input.Json.JsonHotkey.CreateInstance< THotkey >(), and VolumeControl.Core.Input.Json.JsonHotkey.JsonHotkey().


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