
RegisterHotKey is the proper way to use global hotkeys. If a hotkey press event has occurred, then other applications will not see that key press. Hotkeys are global and are processed before regular keyboard input processing which means that if you register a hotkey successfully, pressing that key will result you in getting hotkey message instead of normal keyboard input messages. Win32 RegisterHotKey() defines a system-wide hotkey.
#HOTKEY EVE NOT SHOWING NOTIFICATIONS WINDOWS#
I am using RegisterHotKey the same way as in my other Windows Forms app. As soon as I close my app, it reaches Notepad. My app would register the Tab hotkey with RegisterHotKey, then set handled to false, but the hotkey never reaches Notepad. In my tests, I was trying the Tab hotkey with Notepad open. This also fails to pass the hotkey on to the underlying application. I have also tried not using a Window and an HwndSource hook, and instead using the approach of the ComponentDispatcher.ThreadFilterMessage event to intercept all WM_HOTKEYs and set handled to false like so: private void ComponentDispatcher_ThreadFilterMessage(ref MSG msg, ref bool handled) I have gone so far as to simplify my logic like so: private IntPtr HwndHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) I have another application that's using the Windows Forms Application.AddMessageFilter handler, and in that case it's working fine with the same hotkeys when returning false to indicate the message is unhandled.

However, setting handled to false or true does not change the behavior, which always intercepts the registered hotkeys and does not pass them on to the applications they were pressed in. I am trying to add functionality to not handle the hotkey if I don't take any action by using the HwndSourceHook's handled parameter. I have a WPF application that is using the Win32 RegisterHotKey method and an HwndSource.AddHook message handler.
