### Eclipse Workspace Patch 1.0 #P org.eclipse.swt Index: Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java,v retrieving revision 1.400 diff -u -r1.400 Control.java --- Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java 10 May 2011 18:02:00 -0000 1.400 +++ Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java 19 May 2011 15:29:49 -0000 @@ -5242,17 +5242,26 @@ if (key != 0) { key = Character.toUpperCase (key); MenuItem [] items = menu.getItems (); + + boolean mnemonicFound = false; + boolean firstLetterFound = false; + for (int i=0; i 0 && mnemonic == 0) { char ch = text.charAt (0); - if (Character.toUpperCase (ch) == key) { - display.mnemonicKeyHit = false; - return LRESULT.ZERO; - } + if (Character.toUpperCase (ch) == key) + firstLetterFound = true; } + else + mnemonicFound |= (mnemonic == key); + } + if (firstLetterFound && !mnemonicFound) { + display.mnemonicKeyHit = false; + return LRESULT.ZERO; } } } else {