Release v4.4: keyboard shortcuts are now machine-wide, not per-profile

Fixes issue #14: shortcuts were stored on each Profile, so one set on profile A
didn't apply on profile B and seemed to vanish on switch. They now live in
AppConfig (one set shared by every profile). RemSoundSettingsStore's Load*/Save*
hotkey methods re-point to AppConfig (callers unchanged); the per-profile cache
fields, profile load/save plumbing, and the HotkeySetting helper class are removed.
Profile's HotkeyRecord fields stay only for back-compat deserialization.

On upgrade, shortcuts reset to defaults (there's no single correct set to carry over
since profiles could hold different/partial sets). A one-time startup notice tells
upgraders to re-set them; fresh installs are silently marked done (nothing to reset).

Manual, About changelog and RELEASE_NOTES updated; csproj <Version> 4.4.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ednunp
2026-06-19 23:11:53 +01:00
co-authored by Claude Opus 4.8
parent 32be3426e7
commit 8a1bc0c813
8 changed files with 153 additions and 199 deletions
+26
View File
@@ -147,6 +147,32 @@ public sealed class AppConfig
/// days ago are deleted at startup. Range 130, default 14. Only consulted when that flag is on.</summary>
public int PruneOldLogsDays { get; set; } = 14;
/// <summary>The keyboard shortcuts, machine-wide as of v4.4. Before v4.4 these lived on each
/// <see cref="Profile"/>, so a shortcut set on one profile didn't apply on another (issue #14).
/// They now live here — one set shared by every profile, loaded/saved via
/// <see cref="RemSoundSettingsStore"/>'s Load*/Save* hotkey methods. Null = use the built-in default
/// for that action. The old per-profile <see cref="HotkeyRecord"/> fields on <see cref="Profile"/>
/// are kept only so old profile JSONs still deserialise; they are no longer read or written.</summary>
public HotkeyRecord? ReceiveMuteHotkey { get; set; }
public HotkeyRecord? SendMuteHotkey { get; set; }
public HotkeyRecord? TrayHotkey { get; set; }
public HotkeyRecord? VolumeUpHotkey { get; set; }
public HotkeyRecord? VolumeDownHotkey { get; set; }
public HotkeyRecord? ToggleRecordingHotkey { get; set; }
public HotkeyRecord? RemoteVolumeUpHotkey { get; set; }
public HotkeyRecord? RemoteVolumeDownHotkey { get; set; }
public HotkeyRecord? RemoteMuteToggleHotkey { get; set; }
public HotkeyRecord? SystemVolumeUpHotkey { get; set; }
public HotkeyRecord? SystemVolumeDownHotkey { get; set; }
public HotkeyRecord? SystemMuteToggleHotkey { get; set; }
public HotkeyRecord? QuickProfileSwitchHotkey { get; set; }
public HotkeyRecord? SpeakStatusLineHotkey { get; set; }
/// <summary>True once the one-time "your keyboard shortcuts are now shared across profiles" notice
/// has been shown (to an upgrader), or silently marked done on a fresh install that had nothing to
/// reset. Stops the notice re-appearing. v4.4.</summary>
public bool KeyboardShortcutsGlobalNoticeShown { get; set; }
/// <summary>If non-null and a profile with this title exists, RemSound skips the
/// startup profile picker and loads this profile directly. Combine with
/// <see cref="StartMinimised"/> + the Windows auto-start registry entry