Allow ? key for help too
[pstop.git] / main.go
diff --git a/main.go b/main.go
index 1f40e65..ddefcf0 100644 (file)
--- a/main.go
+++ b/main.go
@@ -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