aboutsummaryrefslogtreecommitdiffstats
path: root/interactive-test.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-06 17:53:09 +0200
committerMattias Andrée <maandree@kth.se>2021-04-06 17:55:01 +0200
commit8f09401e3d7d238355391e4abf3746987c95c492 (patch)
tree5b53b0ceee4610ebc89f9fb878208edcc0cf57f1 /interactive-test.c
parentAdd more key codes (diff)
downloadlibterminput-8f09401e3d7d238355391e4abf3746987c95c492.tar.gz
libterminput-8f09401e3d7d238355391e4abf3746987c95c492.tar.bz2
libterminput-8f09401e3d7d238355391e4abf3746987c95c492.tar.xz
Add support for bracketed paste
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'interactive-test.c')
-rw-r--r--interactive-test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/interactive-test.c b/interactive-test.c
index cc41231..d393a96 100644
--- a/interactive-test.c
+++ b/interactive-test.c
@@ -86,6 +86,14 @@ main(void)
printf("\t%s: %s\n", "meta", (input.keypress.mods & LIBTERMINPUT_META) ? "yes" : "no");
printf("\t%s: %s\n", "ctrl", (input.keypress.mods & LIBTERMINPUT_CTRL) ? "yes" : "no");
printf("\t%s: %s (%llu)\n", "will repeat", input.keypress.times > 1 ? "yes" : "no", input.keypress.times);
+ } else if (input.type == LIBTERMINPUT_BRACKETED_PASTE_START) {
+ printf("bracketed paste start\n");
+ } else if (input.type == LIBTERMINPUT_BRACKETED_PASTE_END) {
+ printf("bracketed paste end\n");
+ } else if (input.type == LIBTERMINPUT_TEXT) {
+ printf("text:\n");
+ printf("\tlength: %zu\n", input.text.nbytes);
+ printf("\tdata: %.512s\n", input.text.bytes);
} else {
printf("other\n");
}