From 0a493d643c3a15779dcee35583f8e5c59fde3031 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 3 Apr 2020 23:46:50 +0300 Subject: Move room switcher to ctrl+k and newline to alt+enter. Fixes #132 --- ui/view-main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/view-main.go b/ui/view-main.go index c0c2424..870c98b 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -183,7 +183,7 @@ func (view *MainView) OnKeyEvent(event mauview.KeyEvent) bool { view.SwitchRoom(view.roomList.Next()) case k == tcell.KeyUp: view.SwitchRoom(view.roomList.Previous()) - case k == tcell.KeyEnter: + case c == 'k' || k == tcell.KeyCtrlK: view.ShowModal(NewFuzzySearchModal(view, 42, 12)) case k == tcell.KeyHome: msgView := view.currentRoom.MessageView() @@ -191,7 +191,7 @@ func (view *MainView) OnKeyEvent(event mauview.KeyEvent) bool { case k == tcell.KeyEnd: msgView := view.currentRoom.MessageView() msgView.AddScrollOffset(-msgView.TotalHeight()) - case c == 'n' || k == tcell.KeyCtrlN: + case k == tcell.KeyEnter: return view.flex.OnKeyEvent(tcell.NewEventKey(tcell.KeyEnter, '\n', event.Modifiers()|tcell.ModShift, "")) case c == 'a': view.SwitchRoom(view.roomList.NextWithActivity()) -- cgit v1.2.3