I personally doubt that there is a definitive solution to this issue.
I know the problem very well. It pretty much happens at least once a week. Especially when switching between virtual machines a lot.
Basically, the issue can be summarized as, the Windows internal keyboard state does not match the state of the physical keyboard. This usually isn't a problem for any key unless it's a modifier key. Interestingly enough, it seems to affect my Windows key most frequently.
Why that is, I don't understand myself.
Let's look at an easy way to reproduce the issue.
- Press and hold the Windows Logo key
- Focus a VirtualBox virtual machine window
- Release the Windows Logo key
- Click the desktop of my physical host machine
If I now press R the Windows Run dialog will pop up, because Windows still thinks the Windows Logo key is pressed. And why shouldn't it? I never released it. I released it on a completely different machine.
What would be the alternative? Interpreting the keyboard changes on the physical host while I work in the VM? Obviously that wouldn't work out well.
Maybe you don't work with VMs, but the problem stays the same. You'll have another application that needs to exclusively capture your keyboard input. Which leads to the problem