show-key kitten: Show plain text received not associated with a key event

This commit is contained in:
Kovid Goyal
2024-04-05 13:40:41 +05:30
parent 8f19d7aa8b
commit 1317a7c4ac

View File

@@ -62,6 +62,13 @@ func run_kitty_loop(opts *Options) (err error) {
lp.Println()
return
}
lp.OnText = func(text string, from_key_event bool, in_bracketed_paste bool) error {
if from_key_event {
return nil
}
lp.Printf("%s: %s\n\n", ctx.Green("Text"), text)
return nil
}
err = lp.Run()
if err != nil {