zVirtualDesktop
zVirtualDesktop copied to clipboard
Cancel out original keypress in Send Keypress
Thanks for sharing this. So my issue is this: when I try to map a key combination, like, say Alt-
Thanks for sharing the feedback. I will test this out. It should not be happening, obviously, but technically, I'm not sending the Alt- down the hook chain so another app shouldn't see them as pressed. It should work this way and I haven't seen any issue. However, certain key combinations may not act the same so I will test with what you are doing.
Am I missing the choice to use the dash/underscore key. Looks that way. Not sure how that would have slipped by.
In an effort to replicate your issue can you give me more detail to how you are using these hotkeys? What application is handling the keystroke you are having zVD send (SHIFT+WIN+~)?
If trying to have zVD handle the one it just sent then, yeah, looking at the code, the previous keys are still down, however, that is an easy fix which I just added the the single line of code that should allow that to work. I'm not sure why you would do that if that's what you're trying to do. Please give me more insight to this if possible.
So here's basically what I'm trying to do. The Windows shortcut for moving a window to another screen (monitor) is Shift-Win-#. I want the Alt-Shift-` keystroke to also do that. If I use the Send keypress function, it doesn't really send Shift-Win-#, but Alt-Shift-Win-#, which really doesn't do anything. That is why the original Alt and Shift keys must be depressed when the Shift and Win keys are sent. That way, the original keystrokes are replaced by the new ones.
ugh what did you just have me do! I pressed SHIFT+WIN+3 thinking it would move the window to my third monitor and Chrome opened a new page and my PC went grayscale. The really messed up part is that is wasn't grayscale due to the Color Filter setting. I had to restart my PC to get color back.
I had my son try on his PC and while his didn't go grayscale, it also didn't move the window.
I am aware of SHIFT+WIN+LEFT or RIGHT, but never knew about the numbers. Either way, those don't appear to be defaults in my Windows environment.
Are you sure this is a Windows default hotkey?
Oh dang! So sorry about that typo! It was supposed to be the Left or Right arrow key instead of #. I'm using a dual monitor set-up so either will work because the window movement just wraps around. Apologies again!
I needed to restart anyway. I probably should have checked for updates first lol
ok, now that I understand what you're doing, let me try it out and see if I can fix it.
Wouldn't it make more sense for me to implement this as new hotkey action where you could even choose the monitor?
ok, so one way to get around this right now is to use CapsLock as a modifier and use CapsLock+Tilde as your hotkey to send. I'll have to think about how to handle this. Probably go with the hotkey action.
I might have to remove the Send Keystroke action. After further testing, it might only work with the CapsLock modifier.
Yes, I'm implementing a workaround for now. But I would largely prefer the original shortcut and intended behavior since the shortcut is already in my left hand's muscle memory. 😁 Of course, a more robust way would be for you to create a new action to move a window to another monitor (instead of simulating a hotkey which does it), if it wouldn't be too much trouble.
Good job! Your issue resulted in 3 tasks.
Thanks, Michael. I'll stay posted for updates. :)
I made a change in 1.0.93.6 that should allow the Send Keystroke to work better. Basically I just added a delay of 1 second before the keystroke is sent. This gives you one second to let go of the current keys. We can play around with this delay if it is too much or not enough. Let me know if this helps your issue.
Thank you! I tried it, and it works. However, the way I'm using the keystroke (move windows around) would require that my fingers are still pressing on the current keys, because I could possibly press the keystrokes more than once per second. This would mean that I would need to release the keys and wait for a second before I could fire another shortcut. Is it possible to send the keystroke replacement regardless of what is currently pressed instead?