diff --git a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java index 7cd1cf17d844..bc9709978415 100644 --- a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java +++ b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java @@ -398,6 +398,8 @@ public class IdeEventQueue extends EventQueue { if (skipTypedKeyEventsIfFocusReturnsToOwner(e)) return; + if (isMetaKeyPressedOnLinux(e)) return; + checkForTimeJump(); if (!appIsLoaded()) { @@ -466,6 +468,13 @@ public class IdeEventQueue extends EventQueue { } } + private static boolean isMetaKeyPressedOnLinux(@NotNull AWTEvent e) { + if (!Registry.is("keymap.skip.meta.press.on.linux")) return false; + boolean metaIsPressed = e instanceof InputEvent && (((InputEvent)e).getModifiersEx() & InputEvent.META_DOWN_MASK) != 0; + boolean typedKeyEvent = e.getID() == KeyEvent.KEY_TYPED; + return SystemInfo.isLinux && typedKeyEvent && metaIsPressed; + } + private boolean skipTypedKeyEventsIfFocusReturnsToOwner(@NotNull AWTEvent e) { if (e.getID() == WindowEvent.WINDOW_LOST_FOCUS) { WindowEvent wfe = (WindowEvent)e; diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index a140708ff6a9..34a71bba087f 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -513,6 +513,8 @@ keymap.windows.as.meta.description='Windows' key press/release events would be p keymap.windows.up.to.maximize.dialogs=true keymap.windows.up.to.maximize.dialogs.description='Windows+Up' shortcut would maximize active dialog under Win 7+ +keymap.skip.meta.press.on.linux=false + caches.indexerThreadsCount=-1 indexer.follows.symlinks=true