Skip to content

Commit

Permalink
Log other actions assigned to the escape and enter actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPl292 committed Nov 23, 2023
1 parent 1a46936 commit c29a409
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.intellij.openapi.extensions.ExtensionPointName
import com.intellij.openapi.keymap.ex.KeymapManagerEx
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
import com.maddyhome.idea.vim.api.key

/**
* Logs the chain of handlers for esc and enter
Expand Down Expand Up @@ -49,6 +50,15 @@ internal class EditorHandlersChainLogger : StartupActivity {
val keymapShortcutsForEnter = keymap.getShortcuts(IdeActions.ACTION_EDITOR_ENTER).joinToString()

LOG.info("Active keymap (${keymap.name}) shortcuts for esc: $keymapShortcutsForEsc, Shortcuts for enter: $keymapShortcutsForEnter")

val actionsForEsc = keymap.getActionIds(key("<esc>")).joinToString("\n")
val actionsForEnter = keymap.getActionIds(key("<enter>")).joinToString("\n")

LOG.info(
"Also keymap (${keymap.name}) has " +
"the following actions assigned to esc:\n$actionsForEsc " +
"\nand following actions assigned to enter:\n$actionsForEnter"
)
}

companion object {
Expand Down

0 comments on commit c29a409

Please sign in to comment.