diff options
Diffstat (limited to 'toolkit/democui/keybindings.go')
| -rw-r--r-- | toolkit/democui/keybindings.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/toolkit/democui/keybindings.go b/toolkit/democui/keybindings.go index 8e5e937..977a375 100644 --- a/toolkit/democui/keybindings.go +++ b/toolkit/democui/keybindings.go @@ -32,11 +32,28 @@ func defaultKeybindings(g *gocui.Gui) error { // dump out the widgets func addDebugKeys(g *gocui.Gui) { + // dump all widget info to the log g.SetKeybinding("", 'd', gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { dumpWidgets(g, v) return nil }) + + // hide all widgets + g.SetKeybinding("", 'h', gocui.ModNone, + func(g *gocui.Gui, v *gocui.View) error { + hideWidgets() + return nil + }) + + // show all widgets + g.SetKeybinding("", 's', gocui.ModNone, + func(g *gocui.Gui, v *gocui.View) error { + showWidgets() + return nil + }) + + // try to adjust all the widget positions g.SetKeybinding("", 'r', gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { adjustWidgets() |
