Control Key Behavior on PD7 + Linux / Ubuntu

Discussion in 'Linux Guest OS Discussion' started by spacewrench, Sep 17, 2011.

  1. spacewrench


    Parallels (both v6 and v7) seem to handle the control and command keys specially in a Linux guest environment. In the Inkscape graphical editor, Ctrl+Mouse Wheel is used to zoom in & out. However, this doesn't work under Parallels.

    I investigated using xev to see what X events are generated. When you press most keys, including Shift, there's an immediate KeyPress event when you press, and an immediate KeyRelease when you let go. However, for the Control, Alt/Option and Command keys, there's NO event when you press the key. However, when you release it, you get a KeyPress followed immediately by a KeyRelease. When you do, e.g., Ctrl+C, the Control KeyPress doesn't happen until you press C, at which time you get the two successive KeyPress events.

    When you combine Ctrl with mouse wheel, (i.e., Press CTRL, then move mouse wheel) you get the KeyPress and ButtonPress events in the WRONG ORDER. Even though Ctrl is pressed first, the events you get are: ButtonPress(5), ButtonRelease(5), then KeyPress(Ctrl) and KeyRelease(Ctrl). So the application never sees that the scroll events happened with the Ctrl modifier.

    When you do multiple scroll clicks with the Ctrl key pressed, the second and subsequent ones have the proper Ctrl bit set (so ctrl-scroll zooming works in Gimp) but it appears Inkscape needs the Ctrl KeyPress event to come before the first scroll-wheel event.

    I have "Use Ctrl+Shift to right-click" disabled (I have a 3-button, scroll-wheel mouse) but Parallels still seems to be treating Ctrl, Alt and Command key presses oddly.

    Any help?

  2. STim

    STim Super Moderator

    Try going to VM Configuration->Options->Advanced and enabling the "Optimize modifier keys for games" option.
  3. spacewrench


    Thanks, Tim! It's still a little wonky, but much better (xev confirms that the Ctrl press is getting reported when you'd expect.)

    Are there any resources for setting up a tablet for use in a guest VM? I also have a Wacom Bamboo pen tablet I'd like to use in Linux, but haven't had much luck yet. (It sort of works if I let Parallels treat it as a regular mouse, but the pressure readings aren't sent through to the guest UI. When I tell Parallels to connect the USB device directly to the guest VM, X and client apps see the device and get pen pressure info, but the UI doesn't display the pen cursor. I suspect that prlmouse is doing some magic to make the mouse work smoother in the guest.)

    Thanks again! With PD7, my Linux VM is almost as smooth as my old native Linux installation used to be, plus I get all that great Mac functionality.

Share This Page