Custom Text Editor Key Shortcuts Follow
Hi, I have a Pycharm plugin with custom editor implementation. How do I block the default Key shortcuts, for example F1-F8, and have it call my callbacks instead? Also, I'd need to detect CTRL Up / Down. I tried TypedHandlerDelegate, but that only detects keystrokes producing some characters.
Please sign in to leave a comment.
Please replace shortcuts carefully to not break IDE UX. It is important that users get the expected behavior for shortcuts they know. See https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html for the full context.
I would try to register your actions with the same shortcuts you want to override and implement
com.intellij.openapi.actionSystem.ActionPromoterwhich promotes your actions when
PlatformCoreDataKeys.FILE_EDITORfrom data context is your editor.
perfect, thanks, that is exactly what I needed.