X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=main.go;h=ddefcf08f4f053910df768479e4c932347647262;hb=c1d87278337656e30aa94447d4d0c32c16fdbfc1;hp=927a15193d539c9a74b063adddcad3836e75aa24;hpb=da7982a6dc5c0387d4aadc996cfe5dc53dafbd45;p=pstop.git diff --git a/main.go b/main.go index 927a151..ddefcf0 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Top like progream which collects information from MySQL's +// pstop - Top like progream which collects information from MySQL's // performance_schema database. package main @@ -183,7 +183,10 @@ func main() { switch event.Key { case termbox.KeyCtrlZ, termbox.KeyCtrlC, termbox.KeyEsc: finished = true - case termbox.KeyTab: // tab - change display modes + case termbox.KeyArrowLeft: // left arrow change to previous display mode + state.DisplayPrevious() + state.Display() + case termbox.KeyTab, termbox.KeyArrowRight: // tab or right arrow - change to next display mode state.DisplayNext() state.Display() } @@ -194,7 +197,7 @@ func main() { } case '+': // increase interval by creating a new ticker wi.SetWaitInterval(wi.WaitInterval() + time.Second) - case 'h': // help + case 'h', '?': // help state.SetHelp(!state.Help()) case 'q': // quit finished = true