From 9a9e05d6bc9ecefd8db51f5110daaee2ec2a8a76 Mon Sep 17 00:00:00 2001 From: Katter Date: Wed, 25 Sep 2024 10:34:21 +0500 Subject: [PATCH] Filter sharphook keys --- SightKeeper.Avalonia/Setup/HotKeysBootstrapper.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SightKeeper.Avalonia/Setup/HotKeysBootstrapper.cs b/SightKeeper.Avalonia/Setup/HotKeysBootstrapper.cs index 3ff76d04..ebbcc55d 100644 --- a/SightKeeper.Avalonia/Setup/HotKeysBootstrapper.cs +++ b/SightKeeper.Avalonia/Setup/HotKeysBootstrapper.cs @@ -15,10 +15,11 @@ public static void Setup(ContainerBuilder builder) hook.RunAsync(); builder.RegisterInstance(hook).As(); SharpHookKeyboardKeyManager keyboardManager = new(hook); - builder.RegisterInstance(keyboardManager).As>(); + KeyManagerFilter keyboardFilter = new(keyboardManager); + builder.RegisterInstance(keyboardFilter).As>(); SharpHookMouseButtonsManager mouseButtonsManager = new(hook); builder.RegisterInstance(mouseButtonsManager).As>(); - AggregateKeyManager aggregateKeyManager = new([keyboardManager, mouseButtonsManager]); + AggregateKeyManager aggregateKeyManager = new([keyboardFilter, mouseButtonsManager]); builder.RegisterInstance(aggregateKeyManager).As(); builder.RegisterType().SingleInstance(); builder.RegisterType().SingleInstance();