How can I prevent stuck keys when VNC into OS X El Capitan loses focus?
Best solution I've found is to click the blank space in the menu bar, and often.  The left Alt key is mapped to command on my Mac from this PC, and I'll Alt-tab in windows or in my viewer and the Alt key sticks, so all clicks are Command-clicks in the Mac.  So I quite often just Alt-click the menu bar to clear that stuck key.