Bug 441 - No 'Move focus to the menu bar' support
Summary: No 'Move focus to the menu bar' support
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.6 RC 1
Hardware: Macintosh Mac OS
: Lowest normal
Target Milestone: 4.2.x
Assignee: Bugzilla
: 15227 ()
Depends on:
Reported: 2011-08-25 15:14 UTC by guivho
Modified: 2015-03-11 04:45 UTC (History)
6 users (show)

Tags: gtk
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description guivho 2011-08-25 15:14:01 UTC
The default keystroke to 'Move focus to the menu bar' on a Mac is Control-F2. MonoDevelop doesn't react on that key. It is simply ignored. (And no, the windows F10 alternative doesn't work either)

There is even no way to define a binding for this, unless it has a funny name. When I search for commands having the word 'menu' as part of the name, it does not show any hits.
Comment 1 Jeffrey Stedfast 2011-09-01 14:01:49 UTC
Hmm, we're letting Control+F2 pass up to gtk (i.e. we're not grabbing it), so this should work... but it isn't.

Wonder if this is a gtk bug?

None of the gtk+ test apps seem to pass Control+F2 up to the menubar either.

Either this is a gtk+ bug or else MacOS apps need to explicitly call something to focus the menubar, but that seems really strange.
Comment 2 Mikayla Hutchinson [MSFT] 2011-09-01 14:43:18 UTC
We have the same issue with the key combination that opens the help menu's search box (which is useful for finding and activating menu commands). I'm pretty sure GTK's suppressing Cocoa's built-in key combination handlers.
Comment 3 Jeffrey Stedfast 2011-09-01 15:35:49 UTC
Maybe we can assign this to the gtk hackers :-)
Comment 4 Miguel de Icaza [MSFT] 2012-04-24 12:32:56 UTC
Jeff, is this something that your new keyboard code would fix?
Comment 5 Mikayla Hutchinson [MSFT] 2012-04-25 12:28:09 UTC
Nope. The problem is that GTK doesn't pass unhandled keystrokes through to Cocoa, so some built-in behaviours don't work. In some cases they can't be reimplemented either.
Comment 6 Cody Russell 2013-10-28 12:16:34 UTC
I have a simple patch to fix this, but will investigate if there is a more general solution.

Are there other very common key combinations that should also be ignored by gtk?
Comment 7 Mikayla Hutchinson [MSFT] 2013-10-28 14:02:02 UTC
Command-? focuses the help menu's search box. We have another bug open for that IIRC.

Be in mind that these can be rebound in system preferences. Not sure how important that really is though.
Comment 8 Cody Russell 2013-10-28 14:07:18 UTC
I found an API, CopySymbolicHotKeys(), that I believe will retrieve all these global hotkeys.  So I'm making a patch to check the key against that, hopefully it will solve these.
Comment 9 Cody Russell 2013-10-28 22:13:39 UTC
I've got a pull request that implements this: https://github.com/mono/bockbuild/pull/6/files
Comment 10 Cody Russell 2013-11-02 00:01:51 UTC
bockbuild 4bcdb62ba9ff1312295ea96518aca845cc343c57
Comment 11 Mikayla Hutchinson [MSFT] 2013-11-13 10:38:32 UTC
Patch was reverted as it caused bug 16161.
Comment 12 PJ 2013-11-19 16:32:21 UTC
This bug was targeted for a past milestone, moving to the next active milestone.
Comment 13 Cody Russell 2015-01-22 11:46:16 UTC
Fixed in bockbuild a40ff424ac6d4ba6210558f0e35f34716bf41fb4
Comment 14 Cody Russell 2015-03-11 04:45:43 UTC
*** Bug 15227 has been marked as a duplicate of this bug. ***