Bug 851090 - Ctrl-Shift composite key not work
Ctrl-Shift composite key not work
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Marc-Andre Lureau
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2012-08-23 04:43 EDT by shendl
Modified: 2013-02-21 03:49 EST (History)
6 users (show)

See Also:
Fixed In Version: spice-gtk-0.14-5.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-21 03:49:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description shendl 2012-08-23 04:43:20 EDT
Description of problem:
   Ctrl-Shift composite key not work
Version-Release number of selected component (if applicable):

How reproducible:
    edit spicy.c file to edit some accelerator to use Ctrl-Shift-XXX  can produce this program.

Steps to Reproduce:
  edit spicy.c file. search " .accelerator = " ,and replace accelerator to <Control><shift>XXX  format.
   replace  .accelerator = "<shift>F12",  to
   .accelerator = " <Control><shift>F12", 
Actual results:
    If you press ctrl-shift-f12 can activate this action.
   And you press ctrl-f12 also can activate this action!

Expected results:
    ctrl-shift-f12 can activate this action,and other composite key can't activate this action!

Additional info:
Comment 2 Christophe Fergeau 2012-08-30 07:42:57 EDT
Can also be reproduced when setting shortcuts through the controller, or with

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index def52c5..f6997eb 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -1348,7 +1348,7 @@ virt_viewer_app_constructor (GType gtype,
gtk_accel_map_add_entry("<virt-viewer>/file/smartcard-insert", GDK_F8, GDK_SHIFT_MASK);
gtk_accel_map_add_entry("<virt-viewer>/file/smartcard-remove", GDK_F9, GDK_SHIFT_MASK);
- gtk_accel_map_add_entry("<virt-viewer>/view/fullscreen", GDK_F11, 0);
+ gtk_accel_map_add_entry("<virt-viewer>/view/fullscreen", GDK_F6, GDK_SHIFT_MASK | GDK_CONTROL_MASK);
gtk_accel_map_add_entry("<virt-viewer>/view/release-cursor", GDK_F12, GDK_SHIFT_MASK);
return obj;

< elmarco> teuf: that seems like a gtk accelerator limitation to me
Comment 3 Marc-Andre Lureau 2012-10-16 12:20:48 EDT
I can't reproduce the issue.

However I understand why you get confused. Customizing the gtk accelarator isn't enough, you need to configure the ~/.config/spice/setting


gtk correctly handles ctrl+shift+f12 by the change you made, and spice-gtk too if this setting

In fact the gtk accelerator isn't really necessary, it is only there as a hint in the menu, but only spice-gtk can handle the ungrab key combination. When the widget doesn't have the grab, spicy will still call ungrab on the widget, but then it is really useless.

Unfortunately, spice-gtk key combination notation is different from gtk, so I proposed a patch to remove the menu entry, and also display the correct sequence in the status bar.
Comment 4 Marc-Andre Lureau 2012-12-10 08:00:25 EST
"Unfortunately, spice-gtk key combination notation is different from gtk, so I proposed a patch to remove the menu entry, and also display the correct sequence in the status bar."

patch in spice-gtk-0.14-5.el6
Comment 8 errata-xmlrpc 2013-02-21 03:49:00 EST
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.


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