Default behavior of "Ctrl + Up/Down" is not being prevented
deltaidea opened this issue · 1 comments
Hi! Thanks for making this utility!
I ran into the following issue.
Expectations
- Run this app
- Open two virtual desktops
- Open this page on the left desktop: https://www.toptal.com/developers/keycode
- Press
Ctrl + Win + Right
(default Windows hotkey)
You should see either key code 17 (ControlLeft
) or 91 (OSLeft
) shown on the page when you return to the left desktop. Notably, you will not see key code 39 (ArrowRight
) because Windows does not let the keyboard event pass to applications if it triggers a Windows hotkey.
I expect pressing Ctrl + Win + Down
to have the same outcome. In other words, I expect the last key that I press in the combo to not result in a "key down" for other apps. I am not sure if the "key up" event should be propagated though - I didn't test this - but it should mirror the default behavior exactly, including if I release the keys in a different order compared to how I pressed them down.
Actual behavior
- Run this app
- Open two virtual desktops
- Open this page on the left desktop: https://www.toptal.com/developers/keycode
- Press
Ctrl + Win + Down
(handled by this app)
When you return to the left desktop, you will see key code 40 (ArrowDown
), which means the browser has received all three key presses. In other words, any active application will act as if I pressed Ctrl+Down
(if it doesn't check Win
). This causes unwanted side-effects for me.
Environment
- App version 1.0.3.1 (downloaded from GitHub releases)
- Windows Windows 11 Pro 22H2 - build 22624.1537
Other notes
It looks like you're currently passively checking if the relevant keys are pressed:
I'm not sure if it's possible to prevent other apps from getting key events with this approach. We might have to use WndProc
or maybe call some sort of low-level Windows DLL.
Thanks again! 💚
Well, using up down is not correct it remove a useful windows feature I agree why not sticking with the default keys (left right) ?