Prefer mnemonic to shortcut is any

IDEA-217670 Mnemonics for Replace -> Replace all (Alt + A) doesn't work in macro when there is an action with same shortcut is defined

GitOrigin-RevId: d4b874662a10e32fb13e2a0a6ab35fab86d2cbc1
This commit is contained in:
Vassiliy.Kudryashov
2019-11-08 20:04:06 +00:00
committed by intellij-monorepo-bot
parent a24b7b98d3
commit 7b5fce403d
@@ -447,8 +447,8 @@ public final class IdeKeyEventDispatcher implements Disposable {
return true;
}
if (SystemInfo.isMac && InputEvent.ALT_DOWN_MASK == e.getModifiersEx() && Registry.is("ide.mac.alt.mnemonic.without.ctrl")) {
// the myIgnoreNextKeyTypedEvent changes event processing to support Alt-based mnemonics on Mac only
if (InputEvent.ALT_DOWN_MASK == e.getModifiersEx() && (!SystemInfo.isMac || Registry.is("ide.mac.alt.mnemonic.without.ctrl"))) {
// the myIgnoreNextKeyTypedEvent changes event processing to support Alt-based mnemonics
if ((KeyEvent.KEY_TYPED == e.getID() && !IdeEventQueue.getInstance().isInputMethodEnabled()) ||
hasMnemonicInWindow(focusOwner, e)) {
myIgnoreNextKeyTypedEvent = true;