mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
This common functionality is moved up to KeyboardWidget. Modules now include widget.InitializeCommonControls() instead.
15 lines
517 B
Go
15 lines
517 B
Go
package gitlab
|
|
|
|
import "github.com/gdamore/tcell"
|
|
|
|
func (widget *Widget) initializeKeyboardControls() {
|
|
widget.InitializeCommonControls()
|
|
|
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
|
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next project")
|
|
|
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous project")
|
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next project")
|
|
}
|