From d858ad1179d98fb5ab31a4e077e789200ef7e411 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 24 Jun 2025 10:57:35 +0000 Subject: [PATCH] Detect support for OSC 52 using the device attributes report. Some terminals are using this to indicate that they support copying to the clipboard with XTerm's OSC 52 sequence. From James Holderness in GitHub issue 4539. --- tty-keys.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tty-keys.c b/tty-keys.c index ac172790..0e4dad2c 100644 --- a/tty-keys.c +++ b/tty-keys.c @@ -1459,6 +1459,8 @@ tty_keys_device_attributes(struct tty *tty, const char *buf, size_t len, tty_add_features(features, "margins", ","); if (p[i] == 28) tty_add_features(features, "rectfill", ","); + if (p[i] == 52) + tty_add_features(features, "clipboard", ","); } break; }