Add hotkey id check

This commit is contained in:
Jack251970 2025-06-28 21:57:44 +08:00
parent 7fddfd961b
commit e087d33fbb
2 changed files with 10 additions and 0 deletions

View file

@ -257,6 +257,12 @@ namespace Flow.Launcher.Plugin
/// </summary>
public bool ShowBadge { get; set; } = false;
/// <summary>
/// List of hotkey IDs that are supported for this result.
/// Those hotkeys should be registed by IPluginHotkey interface.
/// </summary>
public IList<int> HotkeyIds { get; set; } = new List<int>();
/// <summary>
/// Run this result, asynchronously
/// </summary>

View file

@ -269,6 +269,10 @@ internal static class HotKeyMapper
if (metadata.Disabled)
continue;
// Check hotkey supported state
if (!selectedResult.HotkeyIds.Contains(pluginHotkey.Id))
continue;
// Check action nullability
if (pluginHotkey.Action == null)
continue;