command + dot become a escape key in IntelliJ 2020 which is so Annoying

Answered

I am an Emacs guy. I usually use Mac's command + dot key to navigate code.  But I found out after I upgrade to Intellij 2020, the command + dot become the escape key.   Intellij is showing "Prefix Key Pressed" when I press command + dot.  Now it's conflicting everything begin with escape key, copy is an example. 

 

<action id="$Copy">
...
<keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="W"/>
</action>

 

 

Is there workaround on this? Or is there any way to redefine the escape? 

 

 

 

0
2 comments

> Is there workaround on this? Or is there any way to redefine the escape? 

Unfortunately, no. 

Here is related bug request: https://youtrack.jetbrains.com/issue/IDEA-230539

Feel free to vote and follow to be notified once there are any updates. 

0
Avatar
Permanently deleted user

The bug was caused by this commit 

https://github.com/JetBrains/intellij-community/commit/45cd90111db3465287585ac2e0823ea31acbbddc#diff-a70b297a57b3616baf71a3f28b8e688bL794

By default macOS dispatch command+period as escape InputEvent, we will just skip it if escape it not a prefix of any shortcuts.  The above commit add below line  to wait for the second stroke.  

myContext.setHasSecondStroke(true)

 

One workaround for my case is that removing all the shortcuts with `ESCAPE` prefix, and assign a shortcut 'ESCAPE' to GotoDeclaration.

 

 

 

 

below is my diff against Emacs.xml

 

diff --git a/platform/platform-resources/src/keymaps/Emacs.xml b/platform/platform-resources/src/keymaps/Emacs.xml
index 9531282d63ba..c8285606e5f8 100644
--- a/platform/platform-resources/src/keymaps/Emacs.xml
+++ b/platform/platform-resources/src/keymaps/Emacs.xml
@@ -1,6 +1,5 @@
<keymap name="Emacs" parent="$default" version="1" disable-mnemonics="false">
<action id="EditorEscape">
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="ESCAPE"/>
<keyboard-shortcut first-keystroke="control G"/>
</action>
<action id="EditorCutLineBackward">
@@ -54,12 +53,10 @@
<action id="EditorTextStart">
<keyboard-shortcut first-keystroke="control HOME"/>
<keyboard-shortcut first-keystroke="shift alt COMMA"/>
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="COMMA"/>
</action>
<action id="EditorDeleteToWordStart">
<keyboard-shortcut first-keystroke="control BACK_SPACE"/>
<keyboard-shortcut first-keystroke="alt BACK_SPACE"/>
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="BACK_SPACE"/>
</action>
<action id="SaveAll">
<keyboard-shortcut first-keystroke="control X" second-keystroke="control S"/>
@@ -92,7 +89,6 @@
<action id="$Copy">
<keyboard-shortcut first-keystroke="control INSERT"/>
<keyboard-shortcut first-keystroke="alt C"/>
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="W"/>
</action>
<action id="GotoPreviousError">
<keyboard-shortcut first-keystroke="shift F2"/>
@@ -135,8 +131,7 @@
</action>
<action id="GotoDeclaration">
<keyboard-shortcut first-keystroke="control alt G"/>
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="PERIOD"/>
- <keyboard-shortcut first-keystroke="alt PERIOD"/>
+ <keyboard-shortcut first-keystroke="ESCAPE"/>
<mouse-shortcut keystroke="ctrl button1"/>
</action>
<action id="MethodUp">
@@ -174,7 +169,6 @@
</action>
<action id="SynchronizeCurrentFile">
<keyboard-shortcut first-keystroke="alt U"/>
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="U"/>
</action>
<action id="PreviousTab">
<keyboard-shortcut first-keystroke="alt LEFT"/>
@@ -194,7 +188,6 @@
<action id="EditorNextWord">
<keyboard-shortcut first-keystroke="control RIGHT"/>
<keyboard-shortcut first-keystroke="alt F"/>
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="control F"/>
</action>
<action id="CompileProject">
<keyboard-shortcut first-keystroke="shift alt M"/>
@@ -219,7 +212,6 @@
<action id="EditorPreviousWord">
<keyboard-shortcut first-keystroke="control LEFT"/>
<keyboard-shortcut first-keystroke="alt B"/>
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="control B"/>
</action>
<action id="EditorCodeBlockStart">
<keyboard-shortcut first-keystroke="control OPEN_BRACKET"/>
@@ -305,7 +297,6 @@
<keyboard-shortcut first-keystroke="control M"/>
</action>
<action id="GotoAction">
- <keyboard-shortcut first-keystroke="ESCAPE" second-keystroke="X" />
<keyboard-shortcut first-keystroke="alt X" />
</action>

 

 

0

Please sign in to leave a comment.