mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve hotkey model
This commit is contained in:
parent
0aff9e33de
commit
53e0bc33ab
1 changed files with 12 additions and 2 deletions
|
|
@ -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<string> EnumerateDisplayKeys()
|
||||
public readonly IEnumerable<string> EnumerateDisplayKeys()
|
||||
{
|
||||
if (Ctrl && CharKey is not (Key.LeftCtrl or Key.RightCtrl))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue