mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
Add support for more key events
In some cases tcell sends Key{Ctrl,Alt}{Up,Down} events instead of Key{Up,Down} event that have the corresponding modifier mask set. (these key combinations are used for switching rooms)
This commit is contained in:
parent
c3f30a160f
commit
3581ea86b9
1 changed files with 4 additions and 0 deletions
|
@ -193,6 +193,10 @@ func (view *MainView) KeyEventHandler(roomView *RoomView, key *tcell.EventKey) *
|
|||
default:
|
||||
return key
|
||||
}
|
||||
} else if k == tcell.KeyAltDown || k == tcell.KeyCtrlDown {
|
||||
view.SwitchRoom(view.roomList.Next())
|
||||
} else if k == tcell.KeyAltUp || k == tcell.KeyCtrlUp
|
||||
view.SwitchRoom(view.roomList.Previous())
|
||||
} else if k == tcell.KeyPgUp || k == tcell.KeyPgDn || k == tcell.KeyUp || k == tcell.KeyDown || k == tcell.KeyEnd || k == tcell.KeyHome {
|
||||
msgView := roomView.MessageView()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue