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 83334 - shorcut capplet doesn't accept key modifiers beyond alt, control and shift
shorcut capplet doesn't accept key modifiers beyond alt, control and shift
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Keybinding
unspecified
Other other
: High minor
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 86612 87019 92228 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-05-29 05:36 UTC by Gustavo Giráldez
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
call gtk_accelarator_set_default_mod_mask with a full mod mask (903 bytes, patch)
2002-05-29 05:38 UTC, Gustavo Giráldez
none Details | Review

Description Gustavo Giráldez 2002-05-29 05:36:27 UTC
This because the modifier is masked with the value returned by
gtk_accelerator_get_default_mod_mask, which has a default value of
GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK.

I use the Windows key (Mod4 in most layouts) for my window manager
bindings, and I can't set them using the dialog for the reason explained.

I propose the following simple patch to fix it.
Comment 1 Gustavo Giráldez 2002-05-29 05:38:31 UTC
Created attachment 8805 [details] [review]
call gtk_accelarator_set_default_mod_mask with a full mod mask
Comment 2 Jody Goldberg 2002-05-29 14:08:01 UTC
Hmm, the patch will do what you want in the capplet but it will nto allow you
to use any of those accelerators in other applications.  The right place to
handle this would be in gtk+.
    gtkaccellgroup.c
Comment 3 Owen Taylor 2002-05-29 18:34:05 UTC
Basically, if you want to handle this _within_GTK_ you need
to do considerably more work to do it properly ... for one
thing you probably awant to introduce "virtual modifiers"
like, say, GDK_SUPER_MASK in unused high modifier bits.

(We aren't going to change the default mod map as suggested ..
it will break stuff because ... accelerators will no longer
work with NumLock down, etc.)
Comment 4 Owen Taylor 2002-06-12 19:19:21 UTC
Add support for extra virtual modifiers.
Comment 5 Owen Taylor 2002-06-18 15:20:26 UTC
A lot of this could be fixed without GTK+ changes with some
more work in the keybindings applet.

Assigning back to control-center since I don't think it
should block on GDK API changes. GDK issue filed as 
bug 85780.
Comment 6 Luis Villa 2002-06-28 21:02:02 UTC
*** Bug 86612 has been marked as a duplicate of this bug. ***
Comment 7 Luis Villa 2002-07-01 19:06:56 UTC
*** Bug 87019 has been marked as a duplicate of this bug. ***
Comment 8 Luis Villa 2002-07-02 22:30:42 UTC
Because of the a11y implications of this bug, I'm marking it high for
right now; Jody's going to work on it for Sun.
Comment 9 Brian Nitz 2002-07-25 09:34:03 UTC
The problem isn't just the Keyboard Shortcuts capplet, it may be
metacity.  If I use gconftool-2 to manually set a keybinding to a
key-Meta combination, the keybinding doesn't work.
Comment 10 Havoc Pennington 2002-07-25 16:20:51 UTC
Brian what do you set the metacity key to that doesn't work?

Note that I did some work in libegg to support virtual modifiers and
deployed that in CVS for metacity, but I haven't modified the
keybindings capplet yet. There's an open bug with work to make the
panel use the virtual mods code from libegg.
Comment 11 Calum Benson 2002-08-01 17:40:24 UTC
Jody, any status on this?  It's still floating about on our stoppers
list...
Comment 12 Jody Goldberg 2002-08-01 21:31:03 UTC
I just returned from vacation and will think more about this today.
Comment 13 Brian Nitz 2002-08-02 15:15:20 UTC
This works:
gconftool-2 -s -t string
/apps/metacity/global_keybindings/switch_to_workspace_2 "<Control>F2"

But the following command doesn't work.  It ignores the <Meta> and
binds just the F2 key to the action, Meta-F2 does nothing:

gconftool-2 -s -t string
/apps/metacity/global_keybindings/switch_to_workspace_2 "<Meta>F2"
Comment 14 Luis Villa 2002-08-03 04:33:06 UTC
So, um, that part sounds like a metacity bug. [Though control-center
not accepting <mod> is still clearly a control-center bug.]
Comment 15 Jody Goldberg 2002-08-10 16:50:34 UTC
Lets break this down into 2 components

1) keybinding capplet does not accept modifiers beyond shift ctrl and Alt
  This is easy to change (although I'd like to see a clean way to keep numlock
  from appearing).

2) The applications that are supposed to use these accelerators ignore the
   modifiers if they are not part of the stock set.  As Owen has mentioned for
   Gtk+ based apps this is more complicated than it looks.

So for now, I'll close this and we can reopen distinct bugs for the applications
that need to extend their modifier support.
Comment 16 Havoc Pennington 2002-08-10 18:19:34 UTC
But your component #1 still isn't fixed; Metacity allows a <Meta>
keybinding, but you can't set one with the control center capplet.
Am I missing something?
Comment 17 Jody Goldberg 2002-08-10 19:57:54 UTC
I have a patch for it.  It will go in on Monday.
Comment 18 Jody Goldberg 2002-08-13 18:15:00 UTC
Or I could forget my cheesy patch and just use the update already in libegg.
Comment 19 Jody Goldberg 2002-08-23 03:31:23 UTC
Warning.  The patch went into HEAD and 2.1.0, but did not go into gnome-2-0
until today and is not in 2.0.1.1
Comment 20 Stephane Chauveau 2002-09-01 07:36:41 UTC
*** Bug 92228 has been marked as a duplicate of this bug. ***
Comment 21 Stephane Chauveau 2002-09-01 07:44:48 UTC
Setting to <Meta> with gconf does not work for me but <Mod4> 
works fine at least for the key /apps/panel/global.