1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/modules/datadog/keyboard.go
2019-05-10 08:48:15 -04:00

18 lines
499 B
Go

package datadog
import (
"github.com/gdamore/tcell"
)
func (widget *Widget) initializeKeyboardControls() {
widget.SetKeyboardChar("/", widget.ShowHelp)
widget.SetKeyboardChar("j", widget.next)
widget.SetKeyboardChar("k", widget.prev)
widget.SetKeyboardChar("o", widget.openItem)
widget.SetKeyboardKey(tcell.KeyDown, widget.next)
widget.SetKeyboardKey(tcell.KeyEnter, widget.openItem)
widget.SetKeyboardKey(tcell.KeyEsc, widget.unselect)
widget.SetKeyboardKey(tcell.KeyUp, widget.prev)
}