Refactor GlobalHotkeyService to support dynamic hotkey registration and update. Introduce HotkeyModifiers and HotkeyVirtualKey properties in SettingsService for user-defined hotkeys.

This commit is contained in:
2026-02-22 12:14:41 -05:00
parent c1a425a7ad
commit 742c1d70fe
3 changed files with 204 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Text.Json;
@@ -9,7 +9,10 @@ namespace ClipForge
public int ClipLengthSeconds { get; set; } = 30;
public int VideoQuality { get; set; } = 70;
public int Framerate { get; set; } = 60;
public string HotkeyDisplay { get; set; } = "Alt + F9";
/// <summary>Windows modifier flags: Alt=1, Ctrl=2, Shift=4, Win=8.</summary>
public int HotkeyModifiers { get; set; } = 1; // MOD_ALT
/// <summary>Windows virtual key code (e.g. VK_F9=0x78, VK_PRIOR=0x21 for PgUp).</summary>
public int HotkeyVirtualKey { get; set; } = 0x78; // VK_F9
}
public class SettingsService