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 730826 - (aa83af29@opayq.com) Key combo to send key events to host
(aa83af29@opayq.com)
Key combo to send key events to host
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.12.x
Other Linux
: Normal enhancement
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
: 731961 733988 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-05-27 13:58 UTC by totokaka
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description totokaka 2014-05-27 13:58:30 UTC
A key combination that sends key events to the host os, while focusing on the guest os, would increase the useability of Boxes. An example of such a key combination could be right-shift+right-Ctrl, then to for example send a Super keypress to host, the user would type Right-Shift+Right-Ctrl+Super. The key combination should of course be configureable.

It would be nice if this was as generic as possible, so events from the mouse, and any other device, really, would be redirected to the host.
Comment 1 Christophe Fergeau 2014-05-27 14:11:47 UTC
An alternative could be to extend the 'release-cursor' spice-gtk binding to also be a grab/ungrab-keyboard shortcut which is always active, even when spice-vdagent is running in the guest.
Comment 2 Christophe Fergeau 2014-09-19 08:17:41 UTC
What I have in mind seems very close to what virtualbox is doing:
https://mail.gnome.org/archives/gnome-boxes-list/2014-September/msg00003.html
Comment 3 Zeeshan Ali 2014-09-29 12:48:42 UTC
(In reply to comment #2)
> What I have in mind seems very close to what virtualbox is doing:
> https://mail.gnome.org/archives/gnome-boxes-list/2014-September/msg00003.html

And how does one send 'right ctrl' (or whichever key we choose) to guest? We discussed this during Boxes BoF in GUADEC and IIRC the decision was to bring up and focus the overlay toolbar on user pressing the ungrab shortcut.
Comment 4 Zeeshan Ali 2014-09-29 12:51:33 UTC
*** Bug 733988 has been marked as a duplicate of this bug. ***
Comment 5 Zeeshan Ali 2014-10-18 13:28:42 UTC
*** Bug 731961 has been marked as a duplicate of this bug. ***
Comment 6 Marc-Andre Lureau 2014-11-10 16:40:41 UTC
See https://bugs.freedesktop.org/show_bug.cgi?id=85331 for wip
Comment 7 Zeeshan Ali 2015-01-20 17:40:52 UTC
(In reply to comment #6)
> See https://bugs.freedesktop.org/show_bug.cgi?id=85331 for wip

I got 0.27 here and I can't get it to work in Boxes. Does Boxes need to do something to make it work? I tried on a win7 guest. I pressed and release (Left) Ctrl + Alt and then Super key. The main menu on win7 popped up as result.
Comment 8 Marc-Andre Lureau 2015-01-21 00:15:09 UTC
in theory nothing, have you tried with another spice-gtk client? check how input event is being handled in boxes?
Comment 9 Zeeshan Ali 2015-01-21 14:13:58 UTC
(In reply to comment #8)
> in theory nothing, have you tried with another spice-gtk client? check how
> input event is being handled in boxes?

Same with virt-manager. Tried fullscreen and unfullscreen. The 'Super' key always goes to guest.
Comment 10 Zeeshan Ali 2015-01-21 14:22:49 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > in theory nothing, have you tried with another spice-gtk client? check how
> > input event is being handled in boxes?
> 
> Same with virt-manager. Tried fullscreen and unfullscreen. The 'Super' key
> always goes to guest.

Oh works fine with spice-gtk from git master. I thought this was under 0.27 already so I was testing against that.
Comment 11 Zeeshan Ali 2015-01-21 14:45:02 UTC
One thing we do need to update on Boxes side is hint about this. Currently we only show "(press [left] Ctrl+Alt keys to ungrab)" when mouse is grabbed and that only happens with server-side mouse. We probably want to show a similar hint when mouse is ungrabbed and display is focused.
Comment 12 Zeeshan Ali 2015-01-21 22:24:44 UTC
Will likely need a bit more from spice-gtk to handle this well: https://bugs.freedesktop.org/show_bug.cgi?id=85331#c5
Comment 13 Zeeshan Ali 2015-01-21 22:29:34 UTC
Decided to create a seperate bug for hinting user since this bug is resolved:

https://bugzilla.gnome.org/show_bug.cgi?id=743319

Closing this.
Comment 14 Jakub Steiner 2015-01-21 22:37:38 UTC
Ctrl+Alt is a *very* common modifier combo used pretty much in every graphics application and the reason we avoided them for GNOME3 for example.
Comment 15 Marc-Andre Lureau 2015-01-22 00:53:49 UTC
(In reply to comment #14)
> Ctrl+Alt is a *very* common modifier combo used pretty much in every graphics
> application and the reason we avoided them for GNOME3 for example.

In which application does "ctrl+alt" alone does something? (spice-gtk won't do anything if you do ctrl+alt+whatever) but sure, the binding can be configure to something else. What else?
Comment 16 Jakub Steiner 2015-01-29 12:44:57 UTC
(In reply to comment #15)
> In which application does "ctrl+alt" alone does something? (spice-gtk won't do
> anything if you do ctrl+alt+whatever) but sure, the binding can be configure to
> something else. What else?

The combination I speak of is Ctrl+Alt+mouse click (either of the modifier keys). Inkscape, Blender, GIMP, Photoshop and every graphics app I can think of.
Comment 17 Zeeshan Ali 2015-01-29 12:50:00 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > In which application does "ctrl+alt" alone does something? (spice-gtk won't do
> > anything if you do ctrl+alt+whatever) but sure, the binding can be configure to
> > something else. What else?
> 
> The combination I speak of is Ctrl+Alt+mouse click (either of the modifier
> keys). Inkscape, Blender, GIMP, Photoshop and every graphics app I can think
> of.

I knew it! You missed the important fact I was trying to clear up for you: Its not pressing of Ctrl+Alt but rather release of these keys so this won't interfere with Ctrl+Alt+key combos of any apps.
Comment 18 Zeeshan Ali 2015-01-29 12:53:23 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > (In reply to comment #15)
> > > In which application does "ctrl+alt" alone does something? (spice-gtk won't do
> > > anything if you do ctrl+alt+whatever) but sure, the binding can be configure to
> > > something else. What else?
> > 
> > The combination I speak of is Ctrl+Alt+mouse click (either of the modifier
> > keys). Inkscape, Blender, GIMP, Photoshop and every graphics app I can think
> > of.
> 
> I knew it! You missed the important fact I was trying to clear up for you: Its
> not pressing of Ctrl+Alt but rather release of these keys so this won't
> interfere with Ctrl+Alt+key combos of any apps.

And I missed the fact that you were talking of mouse click rather than key. :) However, its still the same. I just tested that if you press Ctrl+alt+click, it doesn't get counted as spice's ungrab sequence but rather goes to the guest.