From ca10325c72bc3bb85b49e92715244b9dbd590783 Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Thu, 26 Mar 2026 22:23:58 +0100 Subject: [PATCH] Remove synchronization from key press handling Removed synchronization and current thread observation for key press handling. --- src/Dapplo.Windows.Input/Keyboard/KeyboardHook.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Dapplo.Windows.Input/Keyboard/KeyboardHook.cs b/src/Dapplo.Windows.Input/Keyboard/KeyboardHook.cs index 027f2fc9..a85597a8 100644 --- a/src/Dapplo.Windows.Input/Keyboard/KeyboardHook.cs +++ b/src/Dapplo.Windows.Input/Keyboard/KeyboardHook.cs @@ -68,10 +68,6 @@ private KeyboardHook() _callback = null; }); }) - // Make sure the key presses come in sequentially - .Synchronize() - // Make sure the subscribed logic runs on the current thread, so we can process the "handled" property - .ObserveOn(Scheduler.CurrentThread) .Publish() .RefCount(); } @@ -252,4 +248,4 @@ private static void SyncLockState() /// IntPtr [DllImport("user32.dll", SetLastError = true)] private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam); -} \ No newline at end of file +}