diff --git a/config/config.go b/config/config.go index 324293c..ed1b865 100644 --- a/config/config.go +++ b/config/config.go @@ -21,6 +21,7 @@ type MessagesViewKeysConfig struct { } type InputViewKeysConfig struct { + SendMessage string `yaml:"send_message"` OpenExternalEditor string `yaml:"open_external_editor"` PasteClipboard string `yaml:"paste_clipboard"` } @@ -72,6 +73,7 @@ func New() *Config { SelectLastMessage: "End", }, InputView: InputViewKeysConfig{ + SendMessage: "Enter", OpenExternalEditor: "Ctrl+E", PasteClipboard: "Ctrl+V", }, diff --git a/ui/input_view.go b/ui/input_view.go index 8332844..9f3a1eb 100644 --- a/ui/input_view.go +++ b/ui/input_view.go @@ -42,7 +42,7 @@ func newInputView(app *Application) *InputView { func (v *InputView) inputCapture(event *tcell.EventKey) *tcell.EventKey { switch event.Name() { - case "Enter": + case v.app.config.Keys.InputView.SendMessage: return v.sendMessage() case v.app.config.Keys.InputView.OpenExternalEditor: return v.openExternalEditor()