cannot seem to bind <ctrl><alt>-<space> for activation

Reported by Sri Ramkrishna on 2011-12-13
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Do
Critical
Chris Halse Rogers
gnome-do (Ubuntu)
Undecided
Unassigned

Bug Description

There seems to be something off with trying to set a binding with <ctrl><alt><space>. It's broken in both Ubuntu 12 and Fedora 16. <Ctrl> is recognized as <Primary> and I cannot use it for some reason.

My convo with ROAF:
17:22 < RAOF> sri: Oh, wow. Seems that Ubuntu 12.04 has the same problem.
17:23 < RAOF> Except my <Ctrl> seems to be recognised as <Primary>. Whatever
              *that* is.
17:24 < RAOF> Huh. And <Super>+Space is recognised as <Hyper>+<Super>+space.
17:24 < RAOF> But works.
17:24 < RAOF> I suspect that something's borken libdo's keybinding stuff.

Thanks :)

Changed in do:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → 0.9
assignee: nobody → Chris Halse Rogers (raof)
Chris Halse Rogers (raof) wrote :

Huh. The code that does this hasn't changed. Perhaps this is a GTK# change? More debugging needed.

Changed in do:
status: Confirmed → In Progress
unwrecker (unwrecker) wrote :

After manual replace <Primary> to <Ctrl> works fine.

Changed in do:
status: In Progress → Fix Committed
Chris Halse Rogers (raof) wrote :

Ok. I've worked around this locally, but it really seems to be a behaviour change (and likely a bug) in GTK - specifically gtk_accelerator_name - when setting <Ctrl>+space it's definitely being fed a modifier state equal to GDK_CONTROL_MASK, but it's returning <Primary>+space.

Chris Halse Rogers (raof) wrote :

Urgh. Who'se been smoking crack?

The same problem hit gnome-control-centre, and was fixed with:
commit e46180ec18192a7954b4e75bca1594ec3ca3ae62
Author: Bastien Nocera <email address hidden>
Date: Mon Oct 24 19:06:27 2011 +0100

    common: Fix handling of <Primary>

    As used in the new GTK+ 3.2.1.

    https://bugzilla.redhat.com/show_bug.cgi?id=748444

diff --git a/panels/common/eggaccelerators.c b/panels/common/eggaccelerators.c
index 5a672ba..71f2433 100644
--- a/panels/common/eggaccelerators.c
+++ b/panels/common/eggaccelerators.c
@@ -178,6 +178,20 @@ is_hyper (const gchar *string)
 }

 static inline gboolean
+is_primary (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'p' || string[1] == 'P') &&
+ (string[2] == 'r' || string[2] == 'R') &&
+ (string[3] == 'i' || string[3] == 'I') &&
+ (string[4] == 'm' || string[4] == 'M') &&
+ (string[5] == 'a' || string[5] == 'A') &&
+ (string[6] == 'r' || string[6] == 'R') &&
+ (string[7] == 'y' || string[7] == 'Y') &&
+ (string[8] == '>'));
+}
+
+static inline gboolean
 is_keycode (const gchar *string)
 {
   return ((string[0] == '0') &&
@@ -310,6 +324,12 @@ egg_accelerator_parse_virtual (const gchar *accelerator,
              len -= 7;
              mods |= EGG_VIRTUAL_SUPER_MASK;
            }
+ else if (len >= 9 && is_primary (accelerator))
+ {
+ accelerator += 9;
+ len -= 9;
+ mods |= EGG_VIRTUAL_CONTROL_MASK;
+ }
          else
            {
              gchar last_ch;

Changed in do:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-do - 0.8.5-2ubuntu1

---------------
gnome-do (0.8.5-2ubuntu1) precise; urgency=low

  * debian/patches/03_fix_keybindings.diff:
    - Fix keybinding code with GTK 3.2.1, which changed gtk_accelerator_name.
      Fixes "keybindings with <Ctrl> display as <Primary>" (LP: #903566)
 -- Christopher James Halse Rogers <email address hidden> Sun, 18 Mar 2012 21:06:50 +1100

Changed in gnome-do (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.