Skip to content
This repository was archived by the owner on Apr 11, 2022. It is now read-only.

Commit 774b251

Browse files
authored
Merge pull request #5 from mroseman95/q-to-exit
adds a hotkey to exit program with q, and adds details in help dialog
2 parents 2c01ae6 + 44d222b commit 774b251

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jsonui.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ func main() {
8787
if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {
8888
log.Panicln(err)
8989
}
90+
if err := g.SetKeybinding("", 'q', gocui.ModNone, quit); err != nil {
91+
log.Panicln(err)
92+
}
9093

9194
if err := g.SetKeybinding(treeView, 'k', gocui.ModNone, cursorMovement(-1)); err != nil {
9295
log.Panicln(err)
@@ -145,6 +148,7 @@ K/PageUp ═ Move 15 line up
145148
e ═ Toggle expend/collapse node
146149
E ═ Expand all nodes
147150
C ═ Collapse all nodes
151+
q/ctrl+c ═ Exit
148152
h/? ═ Toggle help message
149153
`
150154

0 commit comments

Comments
 (0)