mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Make sure everyone has a refresh option Have specific ordering: - Help - Refresh - Select next - Select prev - ... Add unselect where applicable
18 lines
708 B
Go
18 lines
708 B
Go
package github
|
|
|
|
import (
|
|
"github.com/gdamore/tcell"
|
|
)
|
|
|
|
func (widget *Widget) initializeKeyboardControls() {
|
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next source")
|
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous source")
|
|
widget.SetKeyboardChar("o", widget.openRepo, "Open item in browser")
|
|
|
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next source")
|
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous source")
|
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openRepo, "Open item in browser")
|
|
}
|