Skip to content

Commit

Permalink
Filter sharphook keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Neakita committed Sep 25, 2024
1 parent 90dea45 commit 9a9e05d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SightKeeper.Avalonia/Setup/HotKeysBootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ public static void Setup(ContainerBuilder builder)
hook.RunAsync();
builder.RegisterInstance(hook).As<IReactiveGlobalHook>();
SharpHookKeyboardKeyManager keyboardManager = new(hook);
builder.RegisterInstance(keyboardManager).As<KeyManager<FormattedKeyCode>>();
KeyManagerFilter<FormattedKeyCode> keyboardFilter = new(keyboardManager);
builder.RegisterInstance(keyboardFilter).As<KeyManager<FormattedKeyCode>>();
SharpHookMouseButtonsManager mouseButtonsManager = new(hook);
builder.RegisterInstance(mouseButtonsManager).As<KeyManager<FormattedSharpButton>>();
AggregateKeyManager aggregateKeyManager = new([keyboardManager, mouseButtonsManager]);
AggregateKeyManager aggregateKeyManager = new([keyboardFilter, mouseButtonsManager]);
builder.RegisterInstance(aggregateKeyManager).As<KeyManager>();
builder.RegisterType<GestureManager>().SingleInstance();
builder.RegisterType<BindingsManager>().SingleInstance();
Expand Down

0 comments on commit 9a9e05d

Please sign in to comment.