INNER CODE UNIT · Go

keyPos

vladimirvivien/ktop · application/app_ctrl.go:546

		keyPos := event.Key() - tcell.KeyF1
		titles := app.getPageTitles()
		if (keyPos >= 0 || keyPos <= 9) && (int(keyPos) <= len(titles)-1) {
			app.panel.switchToPage(app.getPageTitles()[keyPos])
		}

		return event
	})

	return nil
}

func (app *Application) Run(ctx context.Context) error {

	// setup application UI
	if err := app.setup(ctx); err != nil {
		slog.Error("application setup failed", "error", err)
		return err

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…