1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/modules/github/keyboard.go
Sean Smith 34bf319c2e Rename Prev/Next in MultiSourceWidget
This will open the possibility of a MultiSourceScrollableWidget with no collisions
2019-05-18 11:23:12 -04:00

18 lines
700 B
Go

package github
import (
"github.com/gdamore/tcell"
)
func (widget *Widget) initializeKeyboardControls() {
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous item")
widget.SetKeyboardChar("l", widget.NextSource, "Select next item")
widget.SetKeyboardChar("o", widget.openRepo, "Open item in browser")
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
widget.SetKeyboardKey(tcell.KeyEnter, widget.openRepo, "Open item in browser")
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous item")
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next item")
}