From 4ecd386b6121b4dfc9b369d81bd75755779360d8 Mon Sep 17 00:00:00 2001 From: rigormorrtiss Date: Tue, 31 Aug 2021 17:55:37 +0400 Subject: [PATCH] fix: if ModAlt is pressed while InputField is focused, do not handle the event --- discordo.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/discordo.go b/discordo.go index 2920f41..9c510b0 100644 --- a/discordo.go +++ b/discordo.go @@ -200,6 +200,11 @@ func onMessagesTextViewInputCapture(e *tcell.EventKey) *tcell.EventKey { } func onMessageInputFieldInputCapture(e *tcell.EventKey) *tcell.EventKey { + // If the "Alt" modifier key is pressed, do not handle the event. + if e.Modifiers() == tcell.ModAlt { + return nil + } + switch e.Key() { case tcell.KeyEnter: if selectedChannel == nil {