diff options
| author | Jeff Carr <[email protected]> | 2025-02-06 16:19:36 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-06 16:19:36 -0600 |
| commit | e134ecb6a4285d576c45c3f86274703f32ab30b0 (patch) | |
| tree | 4c07d83ac6a4f195c708c50ca1b4b492931d662e /eventBindings.go | |
| parent | 5bae8b7e41fc17a5020f4c8e58695ae59063cda4 (diff) | |
make stdout upside down
Diffstat (limited to 'eventBindings.go')
| -rw-r--r-- | eventBindings.go | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/eventBindings.go b/eventBindings.go index b59c78f..e3f1994 100644 --- a/eventBindings.go +++ b/eventBindings.go @@ -20,9 +20,11 @@ import ( func registerHandlers(g *gocui.Gui) { // mouse handlers - g.SetKeybinding("", gocui.MouseLeft, gocui.ModNone, mouseDown) // normal left mouse down - g.SetKeybinding("", gocui.MouseLeft, gocui.ModMouseCtrl, ctrlDown) // mouse with the ctrl key held down - g.SetKeybinding("", gocui.MouseRelease, gocui.ModNone, mouseUp) // mouse button release + g.SetKeybinding("", gocui.MouseLeft, gocui.ModNone, mouseDown) // normal left mouse down + g.SetKeybinding("", gocui.MouseLeft, gocui.ModMouseCtrl, ctrlDown) // mouse with the ctrl key held down + g.SetKeybinding("", gocui.MouseRelease, gocui.ModNone, mouseUp) // mouse button release + g.SetKeybinding("", gocui.MouseWheelUp, gocui.ModNone, wheelsUp) // mouse button release + g.SetKeybinding("", gocui.MouseWheelDown, gocui.ModNone, wheelsDown) // mouse button release // Ctrl key handlers g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, doExit) // CTRL-C : exits the application @@ -36,6 +38,8 @@ func registerHandlers(g *gocui.Gui) { g.SetKeybinding("", 'O', gocui.ModNone, theStdout) // 'o' toggle the STDOUT window g.SetKeybinding("", 'q', gocui.ModNone, doExit) // 'q' exit g.SetKeybinding("", gocui.KeyTab, gocui.ModNone, tabCycleWindows) // '2' use this to test new ideas + g.SetKeybinding("", gocui.KeyPgup, gocui.ModNone, stdoutPgup) // Pgup scroll up the Stdout buffer + g.SetKeybinding("", gocui.KeyPgdn, gocui.ModNone, stdoutPgdn) // Pgdn scroll down the Stdout buffer // debugging g.SetKeybinding("", '2', gocui.ModNone, theNotsure) // '2' use this to test new ideas @@ -95,7 +99,26 @@ func addDropdown() *tree.Node { // use this to test code ideas // put whatever you want here and hit '2' to activate it func theNotsure(g *gocui.Gui, v *gocui.View) error { log.Info("got keypress 2. now what?") - log.Info("try to switch windows here") + return nil +} + +func stdoutPgup(g *gocui.Gui, v *gocui.View) error { + log.Info("try to page up in the stdout buffer here") + return nil +} + +func stdoutPgdn(g *gocui.Gui, v *gocui.View) error { + log.Info("try to page down in the stdout buffer here") + return nil +} + +func wheelsUp(g *gocui.Gui, v *gocui.View) error { + log.Info("private wheels up") + return nil +} + +func wheelsDown(g *gocui.Gui, v *gocui.View) error { + log.Info("you've landed") return nil } |
