After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685257 - allow desktop switch with ctrl+alt+arrow_key
allow desktop switch with ctrl+alt+arrow_key
Status: RESOLVED FIXED
Product: gtk-vnc
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-vnc-maint
gtk-vnc-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-02 00:00 UTC by Cole Robinson
Modified: 2013-09-18 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Cole Robinson 2012-10-02 00:00:18 UTC
This sat at https://bugzilla.redhat.com/show_bug.cgi?id=503001 for 3+ years, so moving to the upstream tracker. Original reporter was Stefan Assmann sassmann@redhat.com

Description of problem:
Virt-manager uses the keyboard shortcut ctrl+alt to toggle inside/outside the VM (aka release pointer). Now Gnome uses ctrl+alt+arrow_key to switch virtual desktops. So these two shortcuts collide and virt-manager will grab the key presses as soon as ctrl+alt is pressed and toogle inside/outside the VM, which makes switching desktops impossible.

There should be at least 2 ways to get this working.

Solution 1 (more elegant but probably more complex):
Do not immediately take action on key-down press event, instead wait for another key to be pressed besides ctrl+alt (i.e. ctrl+alt+left) and react on that. Otherwise if only ctrl+alt is pressed and the keys are released trigger on that event to do the actual toggle inside/outside VM. (Note: when outside the VM ctrl+alt+<something> should be handled by the windowmanager)

Benefit of this approach: All ctrl+alt+<something> keyboard shortcuts should work, no more need for "ctrl+alt+<something> send keys". This should also allow to switch virtual desktops inside and outside of a VM.


Solution 2 (less intrusive and easier to accomplish):
Just check whether currently inside or outside of the VM and pass ctrl+alt+<something> to the window manager if outside.

Benefit of this approach: Allow switching of virtual desktops outside of VM. Should be easier to accomplish without having looked at the actual code.


I'd prefer getting Solution 1 to work without knowing how much effort that would cost. Thanks for considering, I'll try to help out on this as good as I can.
Comment 1 Daniel P. Berrange 2013-09-13 13:34:44 UTC
This will be fixed in the following patch, once I get my ssh key for gnome git fixed....

commit af4fc65182f8a51d81fab2d7e46bc4a11a9da452
Author: Daniel P. Berrange <berrange@redhat.com>
Date:   Fri Sep 13 14:22:17 2013 +0100

    Only trigger grab sequence upon release
    
    GTK-VNC uses the keyboard shortcut ctrl+alt to toggle inside/outside
    the VM (aka release pointer). Now Gnome uses ctrl+alt+arrow_key to
    switch virtual desktops. So these two shortcuts collide and gtk-vnc
    will grab the key presses as soon as ctrl+alt is pressed and toogle
    inside/outside the VM, which makes switching desktops impossible.
    
    The solution is to only trigger the grab sequence when the user
    releases the key. So if they press Ctrl+alt and then release it,
    we trigger, but if they press Ctrl+alt+left-arrow we don't trigger
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685257
    
    Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Comment 2 Daniel P. Berrange 2013-09-18 11:23:34 UTC
Fixed in the 0.5.3 release