Bug 846005

Summary: RFE auto-add Hot Key combos to "Send key" menu
Product: Red Hat Enterprise Linux 6 Reporter: David Jaša <djasa>
Component: virt-viewerAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: cfergeau, cwei, dblechte, djasa, lcui, marcandre.lureau, mjenner, mzhan, rbalakri, tzheng
Target Milestone: betaKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-viewer-0.6.0-1.el6 Doc Type: Enhancement
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.
Story Points: ---
Clone Of:
: 846006 922716 (view as bug list) Environment:
Last Closed: 2014-10-14 06:29:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 846006, 922716    

Description David Jaša 2012-08-06 13:08:33 UTC
Description of problem:
auto-add Hot Key combos to "Send key" menu. Because Hot Keys are always captured by virt-viewer, there is currently no way to pass them to the guest.

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-9.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. run remote-viewer from RHEV-M User Portal OR from spice-xpi test page with "Hot Keys" field including "release-cursor=shift+f12"
2. try to make shift-f12 key combo reach the guest
3.
  
Actual results:
there's no way to make shift-f12 reach the guest

Expected results:
user can send shift-f12 to the guest

Additional info:
* shift-f12 is a default keyboard shortcut for cursor release in RHEV-M/oVirt
* shift-f12 is used in web browsers to run web developer tools
* shift-f12 is used in OpenOffice/LibreOffice to toggle bullet lists

Comment 5 Marc-Andre Lureau 2013-05-16 15:06:58 UTC
Note if we just let the ungrab keys pass through, as discussed in bug 889962, then this bug is not worthwhile.

Comment 6 Marc-Andre Lureau 2013-05-17 19:41:37 UTC
David, agree with the above?

Comment 7 David Jaša 2013-05-20 10:23:26 UTC
Well, that solves ungrab key if I read the linked bug correctly, but what about full-screen key?

Comment 8 Marc-Andre Lureau 2013-05-20 13:19:56 UTC
(In reply to David Jaša from comment #7)
> Well, that solves ungrab key if I read the linked bug correctly, but what
> about full-screen key?

only the grab combination was filtered out.(so with the last spice-gtk changes, no keys are filtered out) closing as wontfix?

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

Comment 10 Marc-Andre Lureau 2013-08-19 10:51:05 UTC
Note that the RHEVM bug 846006 for this feature had all acks, and that the patches were cherry-picked for 3.3 already. 

Since 3.3 and 6.5 are to be released about the same time, perhaps this feature should also be part of 6.5?

Comment 13 tingting zheng 2014-06-09 08:49:26 UTC
Tested the bug with:
virt-viewer-0.6.0-5.el6.x86_64

Steps:
1. prepare a guest named rhel6.5.
2. # virt-viewer rhel6.5 --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.
If I click the hotkeys in the menu, it can't work.I can get the below results from xev from guest when I click these hotkeys,the results show that the key combinations have been sent to the guest correctly:
# xev 
KeyPress event, serial 30, synthetic NO, window 0x4800001,
    root 0x106, subw 0x0, time 4037269, (190,-50), root:(192,1),
    state 0x0, 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 0x4800001,
    root 0x106, subw 0x0, time 4037269, (190,-50), root:(192,1),
    state 0x1, 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 0x4800001,
    root 0x106, subw 0x0, time 4037269, (190,-50), root:(192,1),
    state 0x1, keycode 95 (keysym 0xffc8, F11), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x4800001,
    root 0x106, subw 0x0, time 4037269, (190,-50), root:(192,1),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4800001,
    root 0x106, subw 0x0, time 4040917, (160,-51), root:(162,0),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4800001,
    root 0x106, subw 0x0, time 4040917, (160,-51), root:(162,0),
    state 0x1, keycode 96 (keysym 0xffc9, F12), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4800001,
    root 0x106, subw 0x0, time 4040917, (160,-51), root:(162,0),
    state 0x1, keycode 96 (keysym 0xffc9, F12), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4800001,
    root 0x106, subw 0x0, time 4040917, (160,-51), root:(162,0),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Step 3 and step 5,in the menu "Send key", can see the hotkeys at the bottom.

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

Comment 14 errata-xmlrpc 2014-10-14 06:29:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1379.html