Allow ? key for help too
authorSimon J Mudd <sjmudd@pobox.com>
Sat, 13 Dec 2014 17:40:12 +0000 (18:40 +0100)
committerSimon J Mudd <sjmudd@pobox.com>
Sat, 13 Dec 2014 17:40:12 +0000 (18:40 +0100)
main.go
screen/screen.go

diff --git a/main.go b/main.go
index 545170c..ddefcf0 100644 (file)
--- a/main.go
+++ b/main.go
@@ -197,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
index 338583a..9266ad8 100644 (file)
@@ -87,7 +87,7 @@ func (s *TermboxScreen) DisplayHelp() {
        s.PrintAt(0, 5, "Keys:")
        s.PrintAt(0, 6, "- - reduce the poll interval by 1 second (minimum 1 second)")
        s.PrintAt(0, 7, "+ - increase the poll interval by 1 second")
-       s.PrintAt(0, 8, "h - this help screen")
+       s.PrintAt(0, 8, "h/? - this help screen")
        s.PrintAt(0, 9, "q - quit")
        s.PrintAt(0, 10, "t - toggle between showing time since resetting statistics or since P_S data was collected")
        s.PrintAt(0, 11, "z - reset statistics")