git://git.iain.cx/iain
/
pstop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adjust README.md and allow left and right arrow keys to navigate
[pstop.git]
/
main.go
diff --git
a/main.go
b/main.go
index
927a151
..
545170c
100644
(file)
--- 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
// performance_schema database.
package main
@@
-183,7
+183,10
@@
func main() {
switch event.Key {
case termbox.KeyCtrlZ, termbox.KeyCtrlC, termbox.KeyEsc:
finished = true
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()
}
state.DisplayNext()
state.Display()
}