mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
18 lines
768 B
Go
18 lines
768 B
Go
package transmission
|
|
|
|
import "github.com/gdamore/tcell"
|
|
|
|
func (widget *Widget) initializeKeyboardControls() {
|
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
|
widget.SetKeyboardChar("j", widget.Prev, "Select previous item")
|
|
widget.SetKeyboardChar("k", widget.Next, "Select next item")
|
|
widget.SetKeyboardChar("n", nil, "Add new magnet URL")
|
|
widget.SetKeyboardChar("p", nil, "Pause torrent")
|
|
widget.SetKeyboardChar("r", nil, "Remove torrent from list")
|
|
widget.SetKeyboardChar("u", widget.Unselect, "Clear selection")
|
|
|
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
|
}
|