Skip to content

Commit

Permalink
feat: add default keymap for edit code action
Browse files Browse the repository at this point in the history
  • Loading branch information
carlrobertoh committed Jun 29, 2024
1 parent 14a0d40 commit 2725d5a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package ee.carlrobert.codegpt.actions.editor

import com.intellij.openapi.actionSystem.CustomShortcutSet
import com.intellij.openapi.application.runInEdt
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import ee.carlrobert.codegpt.Icons
import ee.carlrobert.codegpt.ui.EditCodePopover
import java.awt.event.InputEvent
import java.awt.event.KeyEvent
import javax.swing.Icon
import javax.swing.KeyStroke

class EditCodeAction : BaseEditorAction {

Expand All @@ -16,6 +20,14 @@ class EditCodeAction : BaseEditorAction {
"Allow LLM to edit code directly in your editor",
icon
) {
registerCustomShortcutSet(
CustomShortcutSet(
KeyStroke.getKeyStroke(
KeyEvent.VK_E,
InputEvent.SHIFT_DOWN_MASK or InputEvent.META_DOWN_MASK
)
), null
)
EditorActionsUtil.registerAction(this)
}

Expand Down

0 comments on commit 2725d5a

Please sign in to comment.