mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge pull request #459 from Seanstoppable/keyboardharmonize
Harmonize keyboard controls
This commit is contained in:
commit
c050292a8d
@ -6,12 +6,13 @@ import (
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("o", widget.openItem, "Open item in browser")
|
widget.SetKeyboardChar("o", widget.openItem, "Open item in browser")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openItem, "Open item in browser")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openItem, "Open item in browser")
|
||||||
}
|
}
|
||||||
|
@ -6,16 +6,16 @@ import (
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help window")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help window")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("h", widget.prevProject, "Select previous project")
|
widget.SetKeyboardChar("h", widget.prevProject, "Select previous project")
|
||||||
widget.SetKeyboardChar("l", widget.nextProject, "Select next project")
|
widget.SetKeyboardChar("l", widget.nextProject, "Select next project")
|
||||||
widget.SetKeyboardChar("j", widget.nextReview, "Select next review")
|
widget.SetKeyboardChar("j", widget.nextReview, "Select next review")
|
||||||
widget.SetKeyboardChar("k", widget.prevReview, "Select previous review")
|
widget.SetKeyboardChar("k", widget.prevReview, "Select previous review")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh items")
|
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.prevProject, "Select previous project")
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.prevProject, "Select previous project")
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.nextProject, "Select next project")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.nextProject, "Select next project")
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.nextReview, "Select next review")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.nextReview, "Select next review")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.prevReview, "Select previous review")
|
widget.SetKeyboardKey(tcell.KeyUp, widget.prevReview, "Select previous review")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openReview, "Open review in browser")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.unselect, "Clear selection")
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.unselect, "Clear selection")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openReview, "Open review in browser")
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,12 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help window")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help window")
|
||||||
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous item")
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("l", widget.NextSource, "Select next item")
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next source")
|
||||||
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous source")
|
||||||
widget.SetKeyboardChar("p", widget.Pull, "Pull repo")
|
widget.SetKeyboardChar("p", widget.Pull, "Pull repo")
|
||||||
widget.SetKeyboardChar("c", widget.Checkout, "Checkout branch")
|
widget.SetKeyboardChar("c", widget.Checkout, "Checkout branch")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous source")
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next source")
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,12 @@ import (
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
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.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")
|
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")
|
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("h", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("h", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("l", widget.Next, "Select next item")
|
widget.SetKeyboardChar("l", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.Prev, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.Next, "Select next item")
|
||||||
|
@ -4,11 +4,11 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
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")
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
}
|
}
|
||||||
|
@ -4,14 +4,14 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help widget")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help widget")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("o", widget.openStory, "Open story in browser")
|
widget.SetKeyboardChar("o", widget.openStory, "Open story in browser")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
||||||
widget.SetKeyboardChar("c", widget.openComments, "Open comments in browser")
|
widget.SetKeyboardChar("c", widget.openComments, "Open comments in browser")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openStory, "Open story in browser")
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openStory, "Open story in browser")
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,13 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("o", widget.openJob, "Open job in browser")
|
widget.SetKeyboardChar("o", widget.openJob, "Open job in browser")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openJob, "Open job in browser")
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openJob, "Open job in browser")
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,13 @@ import (
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.openItem, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("o", widget.openItem, "Open item in browser")
|
widget.SetKeyboardChar("o", widget.openItem, "Open item in browser")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openItem, "Open item in browser")
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openItem, "Open item in browser")
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,12 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous item")
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("l", widget.NextSource, "Select next item")
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next source")
|
||||||
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous source")
|
||||||
widget.SetKeyboardChar("p", widget.Pull, "Pull repo")
|
widget.SetKeyboardChar("p", widget.Pull, "Pull repo")
|
||||||
widget.SetKeyboardChar("c", widget.Checkout, "Checkout branch")
|
widget.SetKeyboardChar("c", widget.Checkout, "Checkout branch")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next source")
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous source")
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,13 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
widget.SetKeyboardChar("h", widget.prev, "Select previous item")
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("l", widget.next, "Select next item")
|
widget.SetKeyboardChar("l", widget.next, "Select next item")
|
||||||
widget.SetKeyboardChar("c", widget.center, "???")
|
widget.SetKeyboardChar("h", widget.prev, "Select previous item")
|
||||||
|
widget.SetKeyboardChar("c", widget.center, "Center on item")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.prev, "Select previous item")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.next, "Select next item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.prev, "Select previous item")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) center() {
|
func (widget *Widget) center() {
|
||||||
|
@ -4,14 +4,13 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("o", widget.openBuild, "Open item in browser")
|
widget.SetKeyboardChar("o", widget.openBuild, "Open item in browser")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
||||||
widget.SetKeyboardChar("u", widget.Unselect, "Clear selection")
|
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openBuild, "Open item in browser")
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openBuild, "Open item in browser")
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
|
||||||
}
|
}
|
||||||
|
@ -2,13 +2,19 @@ package spotify
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gdamore/tcell"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
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("l", widget.next, "Select next item")
|
||||||
|
widget.SetKeyboardChar("h", widget.previous, "Select previous item")
|
||||||
widget.SetKeyboardChar(" ", widget.playPause, "Play/pause song")
|
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() {
|
func (widget *Widget) previous() {
|
||||||
|
@ -2,14 +2,20 @@ package spotifyweb
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gdamore/tcell"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("/", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("h", widget.selectPrevious, "Select previous item")
|
widget.SetKeyboardChar("h", widget.selectPrevious, "Select previous item")
|
||||||
widget.SetKeyboardChar("l", widget.selectNext, "Select next item")
|
widget.SetKeyboardChar("l", widget.selectNext, "Select next item")
|
||||||
widget.SetKeyboardChar(" ", widget.playPause, "Play/pause")
|
widget.SetKeyboardChar(" ", widget.playPause, "Play/pause")
|
||||||
widget.SetKeyboardChar("s", widget.toggleShuffle, "Toggle shuffle")
|
widget.SetKeyboardChar("s", widget.toggleShuffle, "Toggle shuffle")
|
||||||
|
|
||||||
|
widget.SetKeyboardKey(tcell.KeyDown, widget.selectNext, "Select next item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyUp, widget.selectPrevious, "Select previous item")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) selectPrevious() {
|
func (widget *Widget) selectPrevious() {
|
||||||
|
@ -7,12 +7,13 @@ import (
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous item")
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next file")
|
||||||
widget.SetKeyboardChar("l", widget.NextSource, "Select next item")
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous file")
|
||||||
widget.SetKeyboardChar("o", widget.openFile, "Open item")
|
widget.SetKeyboardChar("o", widget.openFile, "Open file")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next file")
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous file")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openFile, "Open file")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) openFile() {
|
func (widget *Widget) openFile() {
|
||||||
|
@ -9,20 +9,21 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar(" ", widget.toggleChecked, "Toggle checkmark")
|
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar(" ", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.displayNext, "Select next item")
|
widget.SetKeyboardChar("j", widget.displayNext, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.displayPrev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.displayPrev, "Select previous item")
|
||||||
|
widget.SetKeyboardChar(" ", widget.toggleChecked, "Toggle checkmark")
|
||||||
widget.SetKeyboardChar("n", widget.newItem, "Create new item")
|
widget.SetKeyboardChar("n", widget.newItem, "Create new item")
|
||||||
widget.SetKeyboardChar("o", widget.openFile, "Open file")
|
widget.SetKeyboardChar("o", widget.openFile, "Open file")
|
||||||
|
|
||||||
|
widget.SetKeyboardKey(tcell.KeyDown, widget.displayNext, "Select next item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyUp, widget.displayPrev, "Select previous item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.unselect, "Clear selection")
|
||||||
widget.SetKeyboardKey(tcell.KeyCtrlD, widget.deleteSelected, "Delete item")
|
widget.SetKeyboardKey(tcell.KeyCtrlD, widget.deleteSelected, "Delete item")
|
||||||
widget.SetKeyboardKey(tcell.KeyCtrlJ, widget.demoteSelected, "Demote item")
|
widget.SetKeyboardKey(tcell.KeyCtrlJ, widget.demoteSelected, "Demote item")
|
||||||
widget.SetKeyboardKey(tcell.KeyCtrlK, widget.promoteSelected, "Promote item")
|
widget.SetKeyboardKey(tcell.KeyCtrlK, widget.promoteSelected, "Promote item")
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.displayNext, "Select next item")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.editSelected, "Edit item")
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.editSelected, "Edit item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.unselect, "Clear selection")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.displayPrev, "Select previous item")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) deleteSelected() {
|
func (widget *Widget) deleteSelected() {
|
||||||
|
@ -4,16 +4,16 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
|
widget.SetKeyboardChar("j", widget.Down, "Select next item")
|
||||||
|
widget.SetKeyboardChar("k", widget.Up, "Select previous item")
|
||||||
widget.SetKeyboardChar("c", widget.Close, "Close item")
|
widget.SetKeyboardChar("c", widget.Close, "Close item")
|
||||||
widget.SetKeyboardChar("d", widget.Delete, "Delete item")
|
widget.SetKeyboardChar("d", widget.Delete, "Delete item")
|
||||||
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
|
||||||
widget.SetKeyboardChar("j", widget.Up, "Select previous item")
|
|
||||||
widget.SetKeyboardChar("k", widget.Down, "Select next item")
|
|
||||||
widget.SetKeyboardChar("l", widget.NextSource, "Select next project")
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next project")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Down, "Select next item")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous project")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next project")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next project")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous project")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Down, "Select next item")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Up, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Up, "Select previous item")
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,13 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("o", widget.openBuild, "Open item in browser")
|
widget.SetKeyboardChar("o", widget.openBuild, "Open item in browser")
|
||||||
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openBuild, "Open item in browser")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openBuild, "Open item in browser")
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,14 @@ import (
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous item")
|
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
|
||||||
widget.SetKeyboardChar("l", widget.NextSource, "Select next item")
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next source")
|
||||||
widget.SetKeyboardChar("o", widget.openFile, "Open item")
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous source")
|
||||||
|
widget.SetKeyboardChar("o", widget.openFile, "Open source")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openFile, "Open item")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next source")
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous source")
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openFile, "Open source")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) openFile() {
|
func (widget *Widget) openFile() {
|
||||||
|
@ -4,12 +4,13 @@ import "github.com/gdamore/tcell"
|
|||||||
|
|
||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help prompt")
|
||||||
|
widget.SetKeyboardChar("r", widget.ShowHelp, "Refresh widget")
|
||||||
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
widget.SetKeyboardChar("j", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("k", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("o", widget.openTicket, "Open item")
|
widget.SetKeyboardChar("o", widget.openTicket, "Open item")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardKey(tcell.KeyEnter, widget.openTicket, "Open item")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyEnter, widget.openTicket, "Open item")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user