1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Added up/down arrow support for ticket navigation in widget

This commit is contained in:
Johan Denoyer 2019-02-05 16:18:36 +01:00
parent ab0dde5169
commit 4dcaa152c7

View File

@ -125,6 +125,16 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
return nil
}
switch event.Key() {
case tcell.KeyDown:
// Select the next item down
widget.next()
widget.display()
return nil
case tcell.KeyUp:
// Select the next item up
widget.prev()
widget.display()
return nil
case tcell.KeyEnter:
widget.openTicket()
return nil