Removed dependency on PowerToysSettings by moving HotkeySettingsControlHook and NativeKeyboardHelper to ManagedCommon

This commit is contained in:
Noraa Junker
2025-12-03 19:59:20 +01:00
parent 0155bb3b63
commit b971d8799a
7 changed files with 7 additions and 8 deletions

View File

@@ -4,8 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library;
using Windows.System; using Windows.System;

View File

@@ -5,7 +5,7 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Microsoft.PowerToys.Settings.UI.Helpers; using ManagedCommon;
namespace RunnerV2 namespace RunnerV2
{ {

View File

@@ -16,7 +16,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\common\ManagedCommon\ManagedCommon.csproj" /> <ProjectReference Include="..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" /> <ProjectReference Include="..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
<ProjectReference Include="..\..\settings-ui\Settings.UI\PowerToys.Settings.csproj" />
<ProjectReference Include="..\..\Update\Update.csproj" /> <ProjectReference Include="..\..\Update\Update.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -3,10 +3,9 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System; using System;
using PowerToys.Interop; using PowerToys.Interop;
namespace Microsoft.PowerToys.Settings.UI.Library namespace ManagedCommon
{ {
public delegate void KeyEvent(int key); public delegate void KeyEvent(int key);
@@ -14,7 +13,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
public delegate bool FilterAccessibleKeyboardEvents(int key, UIntPtr extraInfo); public delegate bool FilterAccessibleKeyboardEvents(int key, UIntPtr extraInfo);
public class HotkeySettingsControlHook : IDisposable public partial class HotkeySettingsControlHook : IDisposable
{ {
private const int WmKeyDown = 0x100; private const int WmKeyDown = 0x100;
private const int WmKeyUp = 0x101; private const int WmKeyUp = 0x101;

View File

@@ -5,7 +5,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Microsoft.PowerToys.Settings.UI.Helpers namespace ManagedCommon
{ {
public static class NativeKeyboardHelper public static class NativeKeyboardHelper
{ {

View File

@@ -5,6 +5,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using ManagedCommon;
namespace Microsoft.PowerToys.Settings.UI.Helpers namespace Microsoft.PowerToys.Settings.UI.Helpers
{ {

View File

@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using CommunityToolkit.WinUI; using CommunityToolkit.WinUI;
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.HotkeyConflicts; using Microsoft.PowerToys.Settings.UI.Library.HotkeyConflicts;