Parallels stealing keyboard input from host windows in Coherence

Discussion in 'Linux Virtual Machine' started by strangecargo, Dec 14, 2011.

  1. strangecargo

    strangecargo Bit poster

    Messages:
    1
    The title says it all. Occasionally in Coherence mode, my guests will start receiving keyboard input that I'm typing into applications running under OS X. A temporary fix seems to be exiting re-entering Coherence mode, but the problem will just happen again later. I tried searching for this issue, but all I could find were other people having this same problem, with no solution (or even official response) on the issue. Anybody else having this problem? It's driving me nuts. I'm using Parallels Desktop 7 under Lion.
     
  2. theJenix

    theJenix Bit poster

    Messages:
    1
    Same problem with Fedora Core 14

    I'm having this same issue...it's very random, very hard to reproduce. I did a bit of investigation and have come up with the following diagnosis: It appears that the problem stems from Parallels not properly releasing the keyboard and mouse. You can test this theory on your machine by pressing your control release keystroke the next time this happens...for me, that stopped Parallels from capturing keyboard input until it was focused again. Unfortunately, after the next time it was focus, the problem would reappear until I exited and re-entered Coherence mode. All in all, a total pain in the butt.

    I have a workaround that I posted to Github...you need to be able to compile and run software built in Xcode 4, but otherwise please check it out, fork it, suggest improvements, etc. It works by watching the active window and sending the control release command when it senses Parallels has lost focus. A couple caveats:
    - Right now, it assumes Ctrl+Alt is the control release command. If yours is different, you'll have to change that in the code.
    - It sends the keystrokes to all windows (i.e. as if it was typed on the keyboard). With the default command, this should not be that big a deal as most programs require a letter/number/ASCII key to perform action.

    The code can be found here: https://github.com/theJenix/straightlines. Please let me know if this works for you, or if you have any questions or comments about it.

    Hope this helps!
    -Jesse

    PS. If there are any Parallels developers watching this that want more info about my system or set up, please message me. This is a very critical bug to leave out there in the wild.
     

Share This Page