From dac05fec84829f7dbc5c08d578681d955e304484 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Thu, 28 Aug 2025 18:20:44 +0800 Subject: [PATCH] fix:issue #141 --- Ink Canvas/Helpers/GlobalHotkeyManager.cs | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Ink Canvas/Helpers/GlobalHotkeyManager.cs b/Ink Canvas/Helpers/GlobalHotkeyManager.cs index 97d06130..b7368d66 100644 --- a/Ink Canvas/Helpers/GlobalHotkeyManager.cs +++ b/Ink Canvas/Helpers/GlobalHotkeyManager.cs @@ -768,6 +768,34 @@ namespace Ink_Canvas.Helpers UpdateHotkeyRegistrationState(); } } + + /// + /// 动态管理快捷键 + /// + public void UpdateHotkeyRegistrationState() + { + try + { + bool isMouseMode = IsInSelectMode(); + + if (isMouseMode) + { + // 在鼠标模式下 + if (_hotkeysShouldBeRegistered) + { + e.Handled = false; + } + else + { + // 快捷键已经处于放行状态 + } + } + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"更新快捷键注册状态时出错: {ex.Message}", LogHelper.LogType.Error); + } + } #endregion #region IDisposable Implementation