GNOME Bugzilla – Bug 61285
No way to have change-on-the-fly menus with unmodified accels
Last modified: 2011-02-04 16:09:32 UTC
When a menu item is selected, it is normally possible to bind a key to it by simply pressing the key. However, in 1.3.9, it is not possible to bind an unmodified key (eg 'L' rather than 'Shift+L'), unless a mouse button is held down while binding the key. Is this change intentional? It seems rather irritating and very unintuitive. Maybe there could be an option for this?
Well, there are two bugs here: - There is supposed to be no way to set a keybinding without a modiifer at all now, but this may be a problem for apps like the GIMP. (Note however, that allowing keybindings without accelerators basically makes it impossible to have mnemonics (underlined characters) for accelerated keyboard handling.) There - You aren't supposed to be able to set keybindings without modifiers even if you have a mouse button down. (gtkmenu.c has (event->state) where it should have (event->state & gtk_accelerator_get_default_mod_mask ())
Resolution of this needs to be synchronized with resolutoin of 52434 which is to set things up so that: - Menus are locked unless the app has infrastructure to handle them - menus are locked unless the user configures things to unlock them
OK, 1.3.11 doesn't allow the 'hold button down' trick anymore. This means that editing the saved menu file is now the only way to set these short-cuts. *Please* can we have a way to allow unmodified accelerators on a per-menu basis before 2.0 (maybe a property on the menu, or a signal to check whether a particular key is allowed?). Otherwise, we have to override the GtkMenu key event handler, which is very messy, as it does other stuff too :-(
I believe what was decided is that we'll - Turn off changing accels by default - If they are on, be very liberal and allow unmodified accels
That sounds ideal! Thanks,
Sat Feb 2 17:43:00 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmenu.c (gtk_menu_key_press): Allow unmodified accelerators, now that accelerator changing can be turned off for those who won't expect it. (#61285)