diff --git a/Flow.Launcher.Infrastructure/Hotkey/RegisteredHotkeyData.cs b/Flow.Launcher.Infrastructure/Hotkey/RegisteredHotkeyData.cs
index 591d3c000..befd49318 100644
--- a/Flow.Launcher.Infrastructure/Hotkey/RegisteredHotkeyData.cs
+++ b/Flow.Launcher.Infrastructure/Hotkey/RegisteredHotkeyData.cs
@@ -26,7 +26,7 @@ public record RegisteredHotkeyData
///
/// representation of this hotkey.
///
- public HotkeyModel Hotkey { get; set; }
+ public HotkeyModel Hotkey { get; private set; }
///
/// String key in the localization dictionary that represents this hotkey. For example, ReloadPluginHotkey,
@@ -233,6 +233,15 @@ public record RegisteredHotkeyData
RemoveHotkey = removeHotkey;
}
+ ///
+ /// Sets the hotkey for this registered hotkey data.
+ ///
+ ///
+ public void SetHotkey(HotkeyModel hotkey)
+ {
+ Hotkey = hotkey;
+ }
+
///
public override string ToString()
{
diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs
index 8a7919590..93be0f42a 100644
--- a/Flow.Launcher/Helper/HotKeyMapper.cs
+++ b/Flow.Launcher/Helper/HotKeyMapper.cs
@@ -260,7 +260,7 @@ internal static class HotKeyMapper
{
var hotkeyData = SearchRegisteredHotkeyData(metadata, globalPluginHotkey);
RemoveHotkey(hotkeyData);
- hotkeyData.Hotkey = newHotkey;
+ hotkeyData.SetHotkey(newHotkey);
SetHotkey(hotkeyData);
}
else if (pluginHotkey is SearchWindowPluginHotkey)
@@ -591,7 +591,7 @@ internal static class HotKeyMapper
RemoveHotkey(registeredHotkeyData);
// Update the hotkey string
- registeredHotkeyData.Hotkey = newHotkey;
+ registeredHotkeyData.SetHotkey(newHotkey);
// Set the new hotkey
SetHotkey(registeredHotkeyData);