app.go 302 B

123456789101112131415161718
  1. package ui
  2. import (
  3. "github.com/gdamore/tcell/v2"
  4. "github.com/rivo/tview"
  5. )
  6. func NewApp() (app *tview.Application) {
  7. app = tview.NewApplication().
  8. EnableMouse(true).
  9. SetInputCapture(onAppInputCapture)
  10. return
  11. }
  12. func onAppInputCapture(event *tcell.EventKey) *tcell.EventKey {
  13. return event
  14. }