|
|
@ -25,6 +25,10 @@ func (ct *Cointop) keybindings(g *gocui.Gui) error {
|
|
|
|
ct.setKeybinding(gocui.KeyArrowDown, ct.cursorDown)
|
|
|
|
ct.setKeybinding(gocui.KeyArrowDown, ct.cursorDown)
|
|
|
|
ct.setKeybinding(gocui.KeyArrowLeft, ct.prevPage)
|
|
|
|
ct.setKeybinding(gocui.KeyArrowLeft, ct.prevPage)
|
|
|
|
ct.setKeybinding(gocui.KeyArrowRight, ct.nextPage)
|
|
|
|
ct.setKeybinding(gocui.KeyArrowRight, ct.nextPage)
|
|
|
|
|
|
|
|
ct.setKeybinding(gocui.KeyPgdn, ct.pageUp)
|
|
|
|
|
|
|
|
ct.setKeybinding(gocui.KeyPgup, ct.pageUp)
|
|
|
|
|
|
|
|
ct.setKeybinding(gocui.KeyHome, ct.navigateFirstLine)
|
|
|
|
|
|
|
|
ct.setKeybinding(gocui.KeyEnd, ct.navigateLastLine)
|
|
|
|
ct.setKeybinding(gocui.KeyEnter, ct.enter)
|
|
|
|
ct.setKeybinding(gocui.KeyEnter, ct.enter)
|
|
|
|
ct.setKeybinding(gocui.KeyEsc, ct.quit)
|
|
|
|
ct.setKeybinding(gocui.KeyEsc, ct.quit)
|
|
|
|
ct.setKeybinding(gocui.KeySpace, ct.enter)
|
|
|
|
ct.setKeybinding(gocui.KeySpace, ct.enter)
|
|
|
@ -34,6 +38,7 @@ func (ct *Cointop) keybindings(g *gocui.Gui) error {
|
|
|
|
ct.setKeybinding(gocui.KeyCtrlP, ct.prevPage)
|
|
|
|
ct.setKeybinding(gocui.KeyCtrlP, ct.prevPage)
|
|
|
|
ct.setKeybinding(gocui.KeyCtrlR, ct.refresh)
|
|
|
|
ct.setKeybinding(gocui.KeyCtrlR, ct.refresh)
|
|
|
|
ct.setKeybinding(gocui.KeyCtrlU, ct.pageUp)
|
|
|
|
ct.setKeybinding(gocui.KeyCtrlU, ct.pageUp)
|
|
|
|
|
|
|
|
ct.setKeybinding('0', ct.firstPage)
|
|
|
|
ct.setKeybinding('1', ct.sortfn("1hchange", true))
|
|
|
|
ct.setKeybinding('1', ct.sortfn("1hchange", true))
|
|
|
|
ct.setKeybinding('2', ct.sortfn("24hchange", true))
|
|
|
|
ct.setKeybinding('2', ct.sortfn("24hchange", true))
|
|
|
|
ct.setKeybinding('7', ct.sortfn("7dchange", true))
|
|
|
|
ct.setKeybinding('7', ct.sortfn("7dchange", true))
|
|
|
@ -41,10 +46,13 @@ func (ct *Cointop) keybindings(g *gocui.Gui) error {
|
|
|
|
ct.setKeybinding('g', ct.navigateFirstLine)
|
|
|
|
ct.setKeybinding('g', ct.navigateFirstLine)
|
|
|
|
ct.setKeybinding('G', ct.navigateLastLine)
|
|
|
|
ct.setKeybinding('G', ct.navigateLastLine)
|
|
|
|
ct.setKeybinding('h', ct.prevPage)
|
|
|
|
ct.setKeybinding('h', ct.prevPage)
|
|
|
|
|
|
|
|
ct.setKeybinding('H', ct.navigatePageFirstLine)
|
|
|
|
ct.setKeybinding('j', ct.cursorDown)
|
|
|
|
ct.setKeybinding('j', ct.cursorDown)
|
|
|
|
ct.setKeybinding('k', ct.cursorUp)
|
|
|
|
ct.setKeybinding('k', ct.cursorUp)
|
|
|
|
ct.setKeybinding('l', ct.nextPage)
|
|
|
|
ct.setKeybinding('l', ct.nextPage)
|
|
|
|
|
|
|
|
ct.setKeybinding('L', ct.navigatePageLastLine)
|
|
|
|
ct.setKeybinding('m', ct.sortfn("marketcap", true))
|
|
|
|
ct.setKeybinding('m', ct.sortfn("marketcap", true))
|
|
|
|
|
|
|
|
ct.setKeybinding('M', ct.navigatePageMiddleLine)
|
|
|
|
ct.setKeybinding('n', ct.sortfn("name", true))
|
|
|
|
ct.setKeybinding('n', ct.sortfn("name", true))
|
|
|
|
ct.setKeybinding('p', ct.sortfn("price", true))
|
|
|
|
ct.setKeybinding('p', ct.sortfn("price", true))
|
|
|
|
ct.setKeybinding('r', ct.sortfn("rank", false))
|
|
|
|
ct.setKeybinding('r', ct.sortfn("rank", false))
|
|
|
@ -53,6 +61,7 @@ func (ct *Cointop) keybindings(g *gocui.Gui) error {
|
|
|
|
ct.setKeybinding('u', ct.sortfn("lastupdated", true))
|
|
|
|
ct.setKeybinding('u', ct.sortfn("lastupdated", true))
|
|
|
|
ct.setKeybinding('v', ct.sortfn("24hvolume", true))
|
|
|
|
ct.setKeybinding('v', ct.sortfn("24hvolume", true))
|
|
|
|
ct.setKeybinding('q', ct.quit)
|
|
|
|
ct.setKeybinding('q', ct.quit)
|
|
|
|
|
|
|
|
ct.setKeybinding('$', ct.lastPage)
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|