show-key kitten: Show plain text received not associated with a key event
This commit is contained in:
parent
8f19d7aa8b
commit
1317a7c4ac
1 changed files with 7 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue