fix:快捷键问题

This commit is contained in:
2025-12-20 18:04:08 +08:00
parent 1abb317054
commit 3287603d0a
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -392,6 +392,13 @@ namespace Ink_Canvas.Helpers
}
else
{
if (_registeredHotkeys.Count == 0)
{
if (ShouldEnableHotkeysBasedOnContext())
{
LoadHotkeysFromSettings();
}
}
}
}
catch (Exception ex)
@@ -447,6 +454,11 @@ namespace Ink_Canvas.Helpers
{
// 如果设置允许,则在鼠标模式下也启用快捷键
EnableHotkeyRegistration();
if (_hotkeysShouldBeRegistered && _registeredHotkeys.Count == 0)
{
LoadHotkeysFromSettings();
}
}
else
{
@@ -458,6 +470,11 @@ namespace Ink_Canvas.Helpers
{
// 非鼠标模式下启用快捷键
EnableHotkeyRegistration();
if (_hotkeysShouldBeRegistered && _registeredHotkeys.Count == 0)
{
LoadHotkeysFromSettings();
}
}
}
catch (Exception ex)
@@ -5,6 +5,7 @@ using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using MessageBox = iNKORE.UI.WPF.Modern.Controls.MessageBox;
namespace Ink_Canvas.Windows
{