Add keys.input_view.send_message field to configuration
This commit is contained in:
parent
069599984b
commit
2c51b9a41d
2 changed files with 3 additions and 1 deletions
|
|
@ -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",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue