app.go 281 B

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