Added Handler registrations in IServiceCollectionExtensions

This commit is contained in:
TheXamlGuy
2024-01-06 15:09:11 +00:00
parent e1c7846e45
commit a77c356389
8 changed files with 106 additions and 19 deletions
+6 -6
View File
@@ -25,11 +25,7 @@ public class KeyInterop
VirtualKey.RightWindows,
VirtualKey.LeftWindows];
public static void Press(VirtualKey key) => SendKey(key, true);
public static void Release(VirtualKey key) => SendKey(key, false);
public static unsafe void Type(VirtualKey key,
public static void Send(VirtualKey key,
params VirtualKey[] modifierKeys)
{
foreach (VirtualKey modiferKey in modifierKeys)
@@ -46,7 +42,11 @@ public class KeyInterop
}
}
private static unsafe void SendKey(VirtualKey key,
private static void Press(VirtualKey key) => Send(key, true);
private static void Release(VirtualKey key) => Send(key, false);
private static unsafe void Send(VirtualKey key,
bool pressed)
{
INPUT input = new()