EditorTextField: getting control keystrokes like Esc, etc
Answered
I'm trying to display a panel with EditorText field and I want to remove it upon receiving a ESC key. I tried to use the TypedActionHandler but it looks like that doesn't intercept control characters. How would I go about doing this?
Thank you!
Please sign in to leave a comment.
You'll need either to create a global handler for EditorEscape action (see e.g. how com.intellij.codeInsight.hint.EscapeHandler is implemented and registered), or create your own AnAction class and register it for the specific component using AnAction.registerCustomShortcutSet.
Thanks. I have another question: Is it possible to also intercept the focus lost event? I'm using the