RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 922716 - auto-add Hot Key combos to "Send key" menu
Summary: auto-add Hot Key combos to "Send key" menu
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-viewer
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Marc-Andre Lureau
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 846005
Blocks: 846006
TreeView+ depends on / blocked
 
Reported: 2013-03-18 11:08 UTC by Geyang Kong
Modified: 2014-06-18 04:29 UTC (History)
13 users (show)

Fixed In Version: virt-viewer-0.5.7-6.el7
Doc Type: Bug Fix
Doc Text:
Feature: auto-add Hot Key combos (which are automatically set by the RHEV portal when it launches remote-viewer) to the "Send key" menu. Reason: Hot Keys are always captured by virt-viewer, there is currently no way to pass them to the guest. Result (if any): Hot Keys are added to the "Send Key" menu, and these menu entries can be used to pass these key combinations to the guest.
Clone Of: 846005
Environment:
Last Closed: 2014-06-13 09:42:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
xev log when clicking shift+f11 and ctrl+0 (4.06 KB, text/x-log)
2013-10-18 05:44 UTC, CongDong
no flags Details

Comment 1 Marc-Andre Lureau 2013-07-22 18:00:13 UTC
Sent patches to the ML:
https://www.redhat.com/archives/virt-tools-list/2013-July/msg00124.html

Comment 4 CongDong 2013-10-10 03:53:04 UTC
I can reproduce this with:
virt-viewer-0.5.6-1.el7.x86_64

Steps:
1. prepare a guest, rhel6.4
2. # virt-viewer rhel6.4  --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
   Check the menu "Send key"
3. # remote-viewer spice://127.0.0.1:5901 --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
   Check the menu "Send key"

Result:
step2, step3, hotkeys work well, but,there is no the hotkeys which is set by cmdline in the menu.


Verify:
virt-viewer-0.5.7-1.el7.x86_64
Steps:
Same as above.

Result:

The hotkeys work well, and in the menu "Send key", can see the hotkeys at the bottom.

But, if I click the hotkeys in the menu, it can't work, and there is a "ctrl+0" at the bottom of the menu, but I didn't set the hotkey.

So, set ASSIGNED.

Comment 5 Marc-Andre Lureau 2013-10-15 12:45:13 UTC
(In reply to CongDong from comment #4)
> Result:
> 
> The hotkeys work well, and in the menu "Send key", can see the hotkeys at
> the bottom.
> 
> But, if I click the hotkeys in the menu, it can't work, and there is a
> "ctrl+0" at the bottom of the menu, but I didn't set the hotkey.
> 
> So, set ASSIGNED.

My guess is you are having the "modifier order" bug fixed in upstream b80e7f0f2 
https://bugzilla.redhat.com/show_bug.cgi?id=846006.

Is there any chance you could try the git version of virt-viewer? thanks

Comment 6 CongDong 2013-10-16 07:38:20 UTC
(In reply to Marc-Andre Lureau from comment #5)
> My guess is you are having the "modifier order" bug fixed in upstream
> b80e7f0f2 
> https://bugzilla.redhat.com/show_bug.cgi?id=846006.
> 
> Is there any chance you could try the git version of virt-viewer? thanks

Hi,

I got the b80e7f0f2 code, but I cannot compile correctly, after "make install" it, there is no command "virt-viewer", "remote-viewer" can be used, but cannot connect the spice guest, so can you help me to compile it ?

Comment 7 Marc-Andre Lureau 2013-10-16 10:58:45 UTC
(In reply to CongDong from comment #6)
> (In reply to Marc-Andre Lureau from comment #5)
> > My guess is you are having the "modifier order" bug fixed in upstream
> > b80e7f0f2 
> > https://bugzilla.redhat.com/show_bug.cgi?id=846006.
> > 
> > Is there any chance you could try the git version of virt-viewer? thanks
> 
> Hi,
> 
> I got the b80e7f0f2 code, but I cannot compile correctly, after "make
> install" it, there is no command "virt-viewer", "remote-viewer" can be used,
> but cannot connect the spice guest, so can you help me to compile it ?

have you done a yum-builddep virt-viewer before? spice-gtk-devel must be installed to get spice support. thanks

Comment 8 CongDong 2013-10-17 03:11:38 UTC
(In reply to Marc-Andre Lureau from comment #7)
> have you done a yum-builddep virt-viewer before? spice-gtk-devel must be
> installed to get spice support. thanks

I installed spice-gtk-devel, still no "virt-viewer", but command "remote-viewer" can connect spice guest.

# remote-viewer spice://127.0.0.1:5900 --hotkeys=toggle-fullscreen=shift+f11

Check the menu "Send key",

Two more items there:
...
Shift+11
Ctrl+0


If I click them, they don't work.

Comment 9 Marc-Andre Lureau 2013-10-17 11:05:24 UTC
(In reply to CongDong from comment #8)
> Shift+11
> Ctrl+0
> 
> 
> If I click them, they don't work.

coould you get the log of xev when clicking those items?

thanks

Comment 10 CongDong 2013-10-18 05:44:25 UTC
Created attachment 813602 [details]
xev log when clicking shift+f11 and ctrl+0

Comment 11 Marc-Andre Lureau 2013-12-12 13:45:30 UTC
(In reply to CongDong from comment #10)
> Created attachment 813602 [details]
> xev log when clicking shift+f11 and ctrl+0

there is no Press/Release even in this log. Make sure xev has the focus,

Launching remote-viewer spice://192.168.1.42:5901 --hotkeys=toggle-fullscreen=shift+f11:

- with virt-viewer-0.5.7-2.el7.x86_64

KeyPress event, serial 33, synthetic NO, window 0x4600001,
    state 0x0, keycode 95 (keysym 0xffc8, F11), same_screen YES,
KeyPress event, serial 33, synthetic NO, window 0x4600001,
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
KeyRelease event, serial 33, synthetic NO, window 0x4600001,
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
KeyRelease event, serial 33, synthetic NO, window 0x4600001,
    state 0x0, keycode 95 (keysym 0xffc8, F11), same_screen YES,

KeyPress event, serial 33, synthetic NO, window 0x2a00001,
    state 0x0, keycode 19 (keysym 0x30, 0), same_screen YES,
KeyPress event, serial 33, synthetic NO, window 0x2a00001,
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
KeyRelease event, serial 33, synthetic NO, window 0x2a00001,
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
KeyRelease event, serial 33, synthetic NO, window 0x2a00001,
    state 0x0, keycode 19 (keysym 0x30, 0), same_screen YES,

- with upstream fix b80e7f0f2:

KeyPress event, serial 30, synthetic NO, window 0x4600001,
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
KeyPress event, serial 30, synthetic NO, window 0x4600001,
    state 0x1, keycode 95 (keysym 0xffc8, F11), same_screen YES,
KeyRelease event, serial 30, synthetic NO, window 0x4600001,
    state 0x1, keycode 95 (keysym 0xffc8, F11), same_screen YES,
KeyRelease event, serial 30, synthetic NO, window 0x4600001,
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,


KeyPress event, serial 30, synthetic NO, window 0x2a00001,
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
KeyPress event, serial 30, synthetic NO, window 0x2a00001,
    state 0x4, keycode 19 (keysym 0x30, 0), same_screen YES,
KeyRelease event, serial 30, synthetic NO, window 0x2a00001,
    state 0x4, keycode 19 (keysym 0x30, 0), same_screen YES,
KeyRelease event, serial 30, synthetic NO, window 0x2a00001,
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,

moving back to POST

Comment 12 Christophe Fergeau 2014-01-28 17:45:57 UTC
Moving back to POST, patch for upstream commit b80e7f0f2 must be added to the curretn build.

Comment 13 tingting zheng 2014-02-07 08:32:10 UTC
Tested with:
virt-viewer-0.5.7-6.el7.x86_64

Steps:
1. prepare a guest named test.
2. # virt-viewer test --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
3.Check the menu "Send key"
4. # remote-viewer spice://127.0.0.1:5901 --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
5.Check the menu "Send key"


Step 2 and step 4,The hotkeys work well by pressing keys.But if I click the hotkeys in the menu, it can't work.

Step 3 and step 5,in the menu "Send key", can see the hotkeys at the bottom.But there is a "ctrl+0" at the bottom of the menu which is not be setted by the hotkey.

Refer to the above comments,move the bug to ASSIGNED.

Comment 14 Christophe Fergeau 2014-02-07 09:19:33 UTC
(In reply to tingting zheng from comment #13)
> Tested with:
> virt-viewer-0.5.7-6.el7.x86_64
> 
> Steps:
> 1. prepare a guest named test.
> 2. # virt-viewer test
> --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
> 3.Check the menu "Send key"
> 4. # remote-viewer spice://127.0.0.1:5901
> --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
> 5.Check the menu "Send key"
> 
> 
> Step 2 and step 4,The hotkeys work well by pressing keys.But if I click the
> hotkeys in the menu, it can't work.

Can you expand on "work"/"can't work" ? When you say "work", I assume you mean "shift+f11" toggles fullscreen ? When you select shift+f11 in the menu, it's not expected to toggle fullscreen, but rather to send shift+f11 to the guest. Is this what you tested, and which did not work? How did you test if the guest received shift+f11?

Comment 15 tingting zheng 2014-02-07 09:34:30 UTC
(In reply to Christophe Fergeau from comment #14)
> (In reply to tingting zheng from comment #13)
> > Tested with:
> > virt-viewer-0.5.7-6.el7.x86_64
> > 
> > Steps:
> > 1. prepare a guest named test.
> > 2. # virt-viewer test
> > --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
> > 3.Check the menu "Send key"
> > 4. # remote-viewer spice://127.0.0.1:5901
> > --hotkeys=toggle-fullscreen=shift+f11,release-cursor=shift+f12
> > 5.Check the menu "Send key"
> > 
> > 
> > Step 2 and step 4,The hotkeys work well by pressing keys.But if I click the
> > hotkeys in the menu, it can't work.
> 
> Can you expand on "work"/"can't work" ? When you say "work", I assume you
> mean "shift+f11" toggles fullscreen ? When you select shift+f11 in the menu,
> it's not expected to toggle fullscreen, but rather to send shift+f11 to the
> guest. Is this what you tested, and which did not work? How did you test if
> the guest received shift+f11?


When I press "shift+f11" by keyboard,it toggles fullscreen,while I click shift+f11 in the menu,it doesn't toggle fullscreen.

Comment 16 Christophe Fergeau 2014-02-07 10:23:09 UTC
(In reply to tingting zheng from comment #15)
> When I press "shift+f11" by keyboard,it toggles fullscreen,while I click
> shift+f11 in the menu,it doesn't toggle fullscreen.

Yes, when clicking shift+f11 in the menu, the key combination should go to the guest, it's not meant to toggle fullscreen. In a linux guest, you can use xev to check if the key combination reaches the guest. Or you can run a remote-viewer instance in the guest, and check remote-viewer gets fullscreen in the guest when you choose shift+f11 in the menu.

Comment 17 tingting zheng 2014-02-08 03:18:32 UTC
(In reply to Christophe Fergeau from comment #16)
> (In reply to tingting zheng from comment #15)
> > When I press "shift+f11" by keyboard,it toggles fullscreen,while I click
> > shift+f11 in the menu,it doesn't toggle fullscreen.
> 
> Yes, when clicking shift+f11 in the menu, the key combination should go to
> the guest, it's not meant to toggle fullscreen. In a linux guest, you can
> use xev to check if the key combination reaches the guest. Or you can run a
> remote-viewer instance in the guest, and check remote-viewer gets fullscreen
> in the guest when you choose shift+f11 in the menu.

Thanks for your clear explanation.
Tested again:
When I click shift+f11 in the menu,it did get the key combination in guest,the xev command shows as below:
KeyPress event, serial 30, synthetic NO, window 0x3c00001,
    root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
    state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 30, synthetic NO, window 0x3c00001,
    root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
    state 0x11, keycode 95 (keysym 0xffc8, F11), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
    root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
    state 0x11, keycode 95 (keysym 0xffc8, F11), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
    root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
    state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

So it is expected result,right?Then there exist another issue:there is a "ctrl+0" at the bottom of the menu which is not be setted by the hotkey.

Comment 18 Christophe Fergeau 2014-02-10 08:55:40 UTC
(In reply to tingting zheng from comment #17)
> Thanks for your clear explanation.
> Tested again:

Thanks for the additional testing!

> When I click shift+f11 in the menu,it did get the key combination in
> guest,the xev command shows as below:
> KeyPress event, serial 30, synthetic NO, window 0x3c00001,
>     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
>     state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
>     XLookupString gives 0 bytes: 
>     XmbLookupString gives 0 bytes: 
>     XFilterEvent returns: False
> 
> KeyPress event, serial 30, synthetic NO, window 0x3c00001,
>     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
>     state 0x11, keycode 95 (keysym 0xffc8, F11), same_screen YES,
>     XLookupString gives 0 bytes: 
>     XmbLookupString gives 0 bytes: 
>     XFilterEvent returns: False
> 
> KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
>     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
>     state 0x11, keycode 95 (keysym 0xffc8, F11), same_screen YES,
>     XLookupString gives 0 bytes: 
>     XFilterEvent returns: False
> 
> KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
>     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
>     state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
>     XLookupString gives 0 bytes: 
>     XFilterEvent returns: False
> 
> So it is expected result,right?

Yes this looks correct.

> Then there exist another issue:there is a
> "ctrl+0" at the bottom of the menu which is not be setted by the hotkey.

And this ctrl+0 is not listed in the menu if you run virt-viewer without the --hotkeys parameter? This is a different bug anyway, so I suggest to move this bug to VERIFIED if your testing shows the initial issue is fixed, and opening a new bug for this ctrl+0 issue.

Comment 19 tingting zheng 2014-02-10 09:26:44 UTC
(In reply to Christophe Fergeau from comment #18)
> (In reply to tingting zheng from comment #17)
> > Thanks for your clear explanation.
> > Tested again:
> 
> Thanks for the additional testing!
> 
> > When I click shift+f11 in the menu,it did get the key combination in
> > guest,the xev command shows as below:
> > KeyPress event, serial 30, synthetic NO, window 0x3c00001,
> >     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
> >     state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
> >     XLookupString gives 0 bytes: 
> >     XmbLookupString gives 0 bytes: 
> >     XFilterEvent returns: False
> > 
> > KeyPress event, serial 30, synthetic NO, window 0x3c00001,
> >     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
> >     state 0x11, keycode 95 (keysym 0xffc8, F11), same_screen YES,
> >     XLookupString gives 0 bytes: 
> >     XmbLookupString gives 0 bytes: 
> >     XFilterEvent returns: False
> > 
> > KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
> >     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
> >     state 0x11, keycode 95 (keysym 0xffc8, F11), same_screen YES,
> >     XLookupString gives 0 bytes: 
> >     XFilterEvent returns: False
> > 
> > KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
> >     root 0x107, subw 0x0, time 515620, (-536,-130), root:(308,5),
> >     state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
> >     XLookupString gives 0 bytes: 
> >     XFilterEvent returns: False
> > 
> > So it is expected result,right?
> 
> Yes this looks correct.
> 
> > Then there exist another issue:there is a
> > "ctrl+0" at the bottom of the menu which is not be setted by the hotkey.
> 
> And this ctrl+0 is not listed in the menu if you run virt-viewer without the
> --hotkeys parameter? This is a different bug anyway, so I suggest to move
> this bug to VERIFIED if your testing shows the initial issue is fixed, and
> opening a new bug for this ctrl+0 issue.

Refer to the comments,I file new bug 1063195 to track the new ctrl+0 issue.
Refer comment 13,14,17,18,move the bug to VERIFIED.

Comment 21 Ludek Smid 2014-06-13 09:42:30 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.