mzomparelli / zVirtualDesktop

Windows 10 Virtual Desktop Hotkeys, System Tray Icon, Wallpapers, and Task View replacement
448 stars 44 forks source link

Alt key is not behaving with Keyboard hooks enabled #279

Open programuotojasgf opened 3 years ago

programuotojasgf commented 3 years ago

I have a AHK script:

#MenuMaskKey vkE8
!`::
Send #+{Right}

What this does is when Alt+` is pressed it sends Win+Shift+Right With ZVirtualDesktop keyboards hooks enabled I have to actually let go of the alt key, instead of just pressing the ` again and again. if I disable the keyboard hooks it works fine.

programuotojasgf commented 3 years ago

I would maybe try and use zVirtualDesktop to send a keystroke instead, but that lags by ~1 second, which is unacceptable.

mzomparelli commented 3 years ago

Thanks for the feedback. I will look into this issue again and try to get to the bottom of it.

programuotojasgf commented 3 years ago

https://github.com/mzomparelli/zVirtualDesktop/issues/243 might be related - I see you've intentionally added a delay - this might be the case. I don't think it's a good idea to delay keystrokes.

mzomparelli commented 3 years ago

The delay only applies to sending keystrokes and does not apply to the keyboard hook. If you don't have hotkey actions of "Send Keystroke" then it should not be related you the ALT key getting stuck in the down position.

programuotojasgf commented 3 years ago

Alt is misbehaving even more badly. My switch do desktop shortcut is Alt + Number . My move window to desktop combo Alt + Shift + Number. If I select chrome ant try to switch to another desktop it doesn't work. But even worse, after doing this a few times I can't move windows with Alt + Shift + Number to other VDs any more at all.

programuotojasgf commented 3 years ago

I am running some applications as administrator. Restarting zVirtualDesktop does not help, but restarting zVirtualDesktop as Administrator does help.

mzomparelli commented 3 years ago

That's interesting that running as admin helps. I'll use that info to investigate further.

I'm really sorry for the issues. While this continues to be an issue I hope it's not too much of an inconvenience to remove the alt key from your hotkeys. If you see this with any other key then please let me know too.

programuotojasgf commented 3 years ago

It only helps temporarily. Is there some sort of debug mode to log the keystrokes for some time to help diagnose this issue?

mzomparelli commented 3 years ago

To be honest, I'm not even sure what to collect that would be helpful to this issue. I'm looking at my hook implementation to find a solution.

I should also point our that if zVD is not running as admin then the keyboard hook will not work when a admin window has focus. To get around this you should run zVD ad admin like you are.