Skip to content

Commit

Permalink
Quitting from help and main screens with 'q' key
Browse files Browse the repository at this point in the history
  • Loading branch information
kjoe committed Feb 13, 2019
1 parent 0079bfd commit 07db7eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions top/help.go
Expand Up @@ -35,9 +35,9 @@ other actions:
, Q ',' show system tables on/off, 'Q' reset postgresql statistics counters.
z 'z' set refresh interval.
h,F1 show this tab.
Ctrl+Q quit.
q,Ctrl+Q quit.
Type 'Esc' to continue.`
Type 'q' or 'Esc' to continue.`
)

// Open gocui view and shows built-in help.
Expand Down
2 changes: 2 additions & 0 deletions top/keybindings.go
Expand Up @@ -24,6 +24,7 @@ func keybindings(g *gocui.Gui) error {
var keys = []key{
{"", gocui.KeyCtrlC, quit},
{"", gocui.KeyCtrlQ, quit},
{"sysstat", 'q', quit},
{"sysstat", gocui.KeyArrowLeft, orderKeyLeft},
{"sysstat", gocui.KeyArrowRight, orderKeyRight},
{"sysstat", gocui.KeyArrowUp, changeWidth(colsWidthIncr)},
Expand Down Expand Up @@ -69,6 +70,7 @@ func keybindings(g *gocui.Gui) error {
{"sysstat", 'h', showHelp},
{"sysstat", gocui.KeyF1, showHelp},
{"help", gocui.KeyEsc, closeHelp},
{"help", 'q', closeHelp},
}

g.InputEsc = true
Expand Down

0 comments on commit 07db7eb

Please sign in to comment.