diff --git a/include/ghostty/vt/modes.h b/include/ghostty/vt/modes.h index fbef4e52b..6786f004b 100644 --- a/include/ghostty/vt/modes.h +++ b/include/ghostty/vt/modes.h @@ -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 */ /** @} */ /** diff --git a/src/terminal/modes.zig b/src/terminal/modes.zig index c545b3304..9b95e85ce 100644 --- a/src/terminal/modes.zig +++ b/src/terminal/modes.zig @@ -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 {