terminal: add kitty clipboard paste events mode (5522), disabled for now

This commit is contained in:
Mitchell Hashimoto
2026-08-21 12:16:38 -07:00
parent f2d4b32be3
commit 07c6fc21ba
2 changed files with 10 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ extern "C" {
#define GHOSTTY_MODE_COLOR_SCHEME_REPORT (ghostty_mode_new(2031, false)) /**< Report color scheme */
#define GHOSTTY_MODE_VISIBILITY_REPORT (ghostty_mode_new(2033, false)) /**< Report terminal visibility */
#define GHOSTTY_MODE_IN_BAND_RESIZE (ghostty_mode_new(2048, false)) /**< In-band size reports */
#define GHOSTTY_MODE_PASTE_EVENTS (ghostty_mode_new(5522, false)) /**< Kitty clipboard protocol paste events */
/** @} */
/**

View File

@@ -327,6 +327,15 @@ const entries: []const ModeEntry = &.{
.{ .name = "report_color_scheme", .value = 2031 },
.{ .name = "report_visibility", .value = 2033, .default_configurable = false },
.{ .name = "in_band_size_reports", .value = 2048 },
// Kitty clipboard protocol paste events. When set, a user-initiated
// paste sends an unsolicited OSC 5522 targets listing with a
// one-time password instead of pasting the text.
// See https://sw.kovidgoyal.net/kitty/clipboard/
//
// Disabled until the apprt paste integration lands; until then the
// mode reports as unrecognized so applications correctly detect
// paste events as unsupported.
.{ .name = "paste_events", .value = 5522, .disabled = true },
};
test {