diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-04-03 23:46:50 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-04-03 23:46:56 +0300 |
commit | 0a493d643c3a15779dcee35583f8e5c59fde3031 (patch) | |
tree | fe652b561895ed1ae3a24af67c946111b41d8cde /ui | |
parent | bce30e32a049b3ee76081c8d3881a3820b0e7341 (diff) |
Move room switcher to ctrl+k and newline to alt+enter. Fixes #132
Diffstat (limited to 'ui')
-rw-r--r-- | ui/view-main.go | 4 |
1 files 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()) |