mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Harmonize keyboard controls
Make sure everyone has a refresh option Have specific ordering: - Help - Refresh - Select next - Select prev - ... Add unselect where applicable
This commit is contained in:
@@ -2,13 +2,19 @@ package spotify
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
)
|
||||
|
||||
func (widget *Widget) initializeKeyboardControls() {
|
||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||
widget.SetKeyboardChar("h", widget.previous, "Select previous item")
|
||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widgett")
|
||||
widget.SetKeyboardChar("l", widget.next, "Select next item")
|
||||
widget.SetKeyboardChar("h", widget.previous, "Select previous item")
|
||||
widget.SetKeyboardChar(" ", widget.playPause, "Play/pause song")
|
||||
|
||||
widget.SetKeyboardKey(tcell.KeyDown, widget.next, "Select next item")
|
||||
widget.SetKeyboardKey(tcell.KeyUp, widget.previous, "Select previous item")
|
||||
}
|
||||
|
||||
func (widget *Widget) previous() {
|
||||
|
||||
Reference in New Issue
Block a user