From 7b5fce403d2e5db2a531d137e7a3b76e8307a238 Mon Sep 17 00:00:00 2001 From: "Vassiliy.Kudryashov" Date: Fri, 8 Nov 2019 22:38:10 +0300 Subject: [PATCH] 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 --- .../intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java index 9041f709ef51..0a51cdbac814 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java @@ -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;