From: Stephen McConnel Date: Wed, 1 Oct 2014 20:04:39 +0000 (-0500) Subject: Remove excessive shortcut key matching in ToolStrip X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=b3214a4a420f4c5515cae3d475a7dadae4d69435;p=mono.git Remove excessive shortcut key matching in ToolStrip This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=23532. --- diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs index 30c0d89f5fb..6cfe4b2ecf8 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs @@ -1145,13 +1145,7 @@ namespace System.Windows.Forms if (tsi.Enabled && tsi.Visible && !string.IsNullOrEmpty (tsi.Text) && Control.IsMnemonic (charCode, tsi.Text)) return tsi.ProcessMnemonic (charCode); - string code = Char.ToUpper (charCode).ToString (); - - // If any item's text starts with our letter, it gets the message - if ((Control.ModifierKeys & Keys.Alt) != 0 || this is ToolStripDropDownMenu) - foreach (ToolStripItem tsi in this.Items) - if (tsi.Enabled && tsi.Visible && !string.IsNullOrEmpty (tsi.Text) && tsi.Text.ToUpper ().StartsWith (code) && !(tsi is ToolStripControlHost)) - return tsi.ProcessMnemonic (charCode); + // Do not try to match any further here. See Xamarin bug 23532. return base.ProcessMnemonic (charCode); }