public static void Execute(IShortcutHandlerParent mw, string key) { LoggerSingleton.Inst.Trace("ShortcutManager", $"Execute Action [{key}]"); if (_actions.TryGetValue(key, out var action)) { action.Run(mw); } }
public static string GetGestureStr(IShortcutHandlerParent mw, string key) { if (_actions.ContainsKey(key)) { if (mw.Settings != null && mw.Settings.Shortcuts.TryGetValue(key, out var shortcut)) { return(shortcut.GetGestureStr()); } } return(string.Empty); }
public bool Run(IShortcutHandlerParent w) { if (Modifier.HasFlag(ActionModifier.Disabled)) { return(false); } if (Modifier.HasFlag(ActionModifier.DebugOnly) && !AlephAppContext.DebugMode) { return(false); } if (Modifier.HasFlag(ActionModifier.AccessControl) && w.Settings.IsReadOnlyMode) { return(false); } return(_run(this, w)); }