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 150897 - Windows key should be able to pop up main menu
Windows key should be able to pop up main menu
Status: RESOLVED OBSOLETE
Product: metacity
Classification: Other
Component: general
2.20.x
Other All
: High enhancement
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 436023 500032 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-08-24 01:10 UTC by Federico Mena Quintero
Modified: 2020-11-07 12:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Patch to grab the Windows flag keys and use them. (9.87 KB, patch)
2004-08-24 01:11 UTC, Federico Mena Quintero
needs-work Details | Review

Description Federico Mena Quintero 2004-08-24 01:10:22 UTC
The attached patch adds a gconf key

  /apps/metacity/general/enable_windows_keys

When activated, pressing either of the Windows flag keys will tell the panel to
pop up its main menu.
Comment 1 Federico Mena Quintero 2004-08-24 01:11:13 UTC
Created attachment 30881 [details] [review]
Patch to grab the Windows flag keys and use them.
Comment 2 Elijah Newren 2004-08-24 01:24:59 UTC
But doesn't that destroys all key combinations (and mouse modifications) for
Super?  It seems to me that this would be much like binding Ctrl to showing the
run application dialog, thereby disabling Ctrl for everything else...
Comment 3 Federico Mena Quintero 2004-08-24 02:30:59 UTC
If you have a program that requires Super, you deserve to lose anyway :)
Comment 4 Federico Mena Quintero 2004-08-24 02:32:20 UTC
Why are we setting the keysyms of the Windows keys to SuperL/R, anyway?  I've
never seen a space-cadet keyboard in person, and know of no programs that
require Super modifiers.

Emacs doesn't count, and even it doesn't require them.
Comment 5 Elijah Newren 2004-08-24 03:00:02 UTC
There's a large difference between /requiring/ the use of Super and being
/allowed/ to use it for useful things.  ;-)

Metacity at one point used Super as a modifier itself.  For a while, it was the
default modifier for button presses (i.e. move with Super+left-click instead of
Alt+left-click, resize with Super+middle-click instead of Alt+middle-click,
etc.)  There is still a configuration option for this (not just a gconf key).

One of the nice things about super is that it provides a whole bunch of
keybindings the user can bind (or the window manager, if we ever decide we want
to use it?) that would be far less likely to conflict with other programs than
ctrl/alt/shift ones.  I even feel it is somewhat intuitive that way, think of
the "Windows" key as being the one that lets me define "window manager" actions.

Just my $0.02...
Comment 6 Federico Mena Quintero 2004-08-24 17:34:19 UTC
Maybe it is that I don't use the Alt-drag stuff to move/resize windows, but you
can always use direct manipulation of graphical elements to accomplish that ---
move by dragging the title bar, resize by dragging the edges, etc.

The patch to use the Windows flag keys to pop up the panel menu is so that
people who are used to Windows will find equivalent functionality in Gnome.

[At least within Novell, people always complain when that doesn't work...]

In any case, including this would not block us from later using those keys as
modifiers for Metacity's purposes only.  If you press and release a Windows key
with no actions in the middle (e.g. click/drag), they could work like "normal"
non-modifier keys; in this case they would bring up the panel menu.
Comment 7 Elijah Newren 2004-08-24 18:04:57 UTC
Windows does it?  I didn't know that.  That is a good argument for this.  And
your ideas for being able to simultaneously use it for both purposes clears up
any reservations I had.

Of course, it's not my choice anyway...  Havoc?
Comment 8 Havoc Pennington 2004-08-25 02:53:09 UTC
Comment on attachment 30881 [details] [review]
Patch to grab the Windows flag keys and use them.

Why the hardcoded keycodes? Should be able to scan for them, see the way we
find Mode_switch for example. I think it's OK to assume that Super_* are the
windows keys.

Why do this as a special-case enable_windows_keys instead of a keybinding
open_panel_menu that can be bound to the windows keys? We could hypothetically
support setting any keybinding to only a modifier key, by generalizing the code
in this patch, maybe...
Comment 9 Federico Mena Quintero 2004-09-13 18:19:49 UTC
So do we want something like

boolean did_something;

key_press_event (GdkEventKey *event)
{
  if (is_modifier (event->keysym))
     did_something = FALSE;

  ...
}

mouse_drag_event ()
{
  if (event->state & GDK_SOME_MODIFIER_MASK) {
      did_something = TRUE;
      move_window ();
  }
  ...
}

key_release_event (GdkEventKey *event)
{
  if (is_modifier (event->keysym) && !did_something)
    activate_binding_for_key (event->keysym);
}

The idea is that you can use modifiers as bindings by themselves, or as "true"
modifiers if you e.g. drag the mouse while pressing them.
Comment 10 Jakub Steiner 2004-09-14 11:07:36 UTC
Because the windows key is hardly used for shortcuts in any application (Unlike
Ctrl, Alt and Shift), I really liked having it bound to window handling and
workspace switching in metacity because it wouldn't clash with GIMP, Blender and
other shortcut packed applications. I would really welcome if it was possible to
configure the windows key NOT to open the panel menu.
Comment 11 Luis Villa 2005-01-03 23:54:26 UTC
Comment on attachment 30881 [details] [review]
Patch to grab the Windows flag keys and use them.

As per Havoc-comments.
Comment 12 Dan Winship 2005-01-05 17:51:03 UTC
Why make Metacity have magic special handling for the Super key? Why not
just tweak the xkb settings in NLD so that the Windows keys aren't modifiers
any more, so they can just be bound normally in the Shortcuts capplet?
(In fact, in NLD at least, there's already an entry for "Open Panel Menu"
there. Havoc's comment #8 implies that that is not part of stock metacity,
in which case NLD is being extra evil by hardcoding this behavior in one
place and then also providing a visible frob that looks like it ought to be
able to turn it off even though it can't.)

Having the Windows key irrevocably bound to anything is evil because
different keyboards disagree on the layout of the modifier keys. Eg,
consider switching between a Desktop PC and a ThinkPad:

Desktop PC:  Control   Windows  Alt
ThinkPad:    Function  Control  Alt

(likewise for switching between a Desktop PC and a Mac, and probably with
some other notebook keyboards too). I routinely end up hitting Windows when
I didn't mean to, and having it pop up the panel menu every time is really
annoying.
Comment 13 Werner Meyer 2007-03-08 12:21:37 UTC
I just would like to have working the right win key as level3 chooser using xmodmap:

! keycode 116 = Super_R Multi_key
keycode 116 = ISO_Level3_Shift

Also if I had only one (left) win key (as I have on my notebook) I would prefer
to work the win key as level3-chooser and to work as open_menu only together
with shift...
Comment 14 Elijah Newren 2007-11-29 03:44:40 UTC
*** Bug 436023 has been marked as a duplicate of this bug. ***
Comment 15 Elijah Newren 2007-11-29 03:44:52 UTC
*** Bug 500032 has been marked as a duplicate of this bug. ***
Comment 16 petrosyan 2007-11-29 05:29:29 UTC
Can somebody update the version field to "2.20.x" please?
Comment 17 petrosyan 2008-04-28 16:34:20 UTC
this bug is still present in GNOME 2.22.1
please update the version field.
Comment 18 Thomas Thurman 2008-04-28 16:40:10 UTC
All that's necessary is to allow "<Super>" to be included in /apps/metacity/global_keybindings/panel_main_menu_list .
Comment 19 André Klapper 2020-11-07 12:35:47 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all
old feature requests in Bugzilla which have not seen updates for many years.

If you still use metacity and if you are still requesting this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/

Thank you for reporting this issue and we are sorry it could not be implemented.