code: func (g *Gui) onKey(ev *termbox.Event) error {
  	switch ev.Type {
  	case termbox.EventKey:
  		matched, err := g.execKeybindings(g.currentView, ev)
  		if err != nil {
  			return err
  		}
  		if matched {
  			break
  		}
  		if g.currentView != nil && g.currentView.Editable && g.currentView.Editor != nil {
  			g.currentView.Editor.Edit(g.currentView, Key(ev.Key), ev.Ch, Modifier(ev.Mod))
  		}
  	case termbox.EventMouse:
  		mx, my := ev.MouseX, ev.MouseY
  		v, err := g.ViewByPosition(mx, my)
  		if err != nil {
  			break
  		}
  		if err := v.SetCursor(mx-v.x0-1, my-v.y0-1); err != nil {
  			return err
  		}
  		if _, err := g.execKeybindings(v, ev); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // onKey manages key-press events. A keybinding handler is called when
  // a key-press or mouse event satisfies a configured keybinding. Furthermore,
  // currentView's internal buffer is modified if currentView.Editable is true.