diff --git a/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs b/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs index 25bc75a56..0885f6598 100644 --- a/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs +++ b/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs @@ -117,12 +117,22 @@ namespace Flow.Launcher.Infrastructure.Hotkey } } - public override string ToString() + public bool Equals(HotkeyModel other) + { + return CharKey == other.CharKey && ModifierKeys == other.ModifierKeys; + } + + public KeyGesture ToKeyGesture() + { + return new KeyGesture(CharKey, ModifierKeys); + } + + public override readonly string ToString() { return string.Join(" + ", EnumerateDisplayKeys()); } - public IEnumerable EnumerateDisplayKeys() + public readonly IEnumerable EnumerateDisplayKeys() { if (Ctrl && CharKey is not (Key.LeftCtrl or Key.RightCtrl)) {