Commit 9db69ec

L.B.R.  ·  2026-02-21 10:08:20 -0500 EST
parent 48520f9
fix(terminal): pop Kitty keyboard protocol on detach (#59)

1 files changed,  +3, -0
+3, -0
......@@ -936,6 +936,9 @@ fn attach(daemon: *Daemon) !void {
936936 // want to corrupt any programs that rely on it including ghostty's session restore.
937937 const restore_seq = "\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l" ++
938938 "\x1b[?2004l\x1b[?1004l\x1b[?1049l" ++
939+ // Restore pre-attach Kitty keyboard protocol mode so Ctrl combos
940+ // return to legacy encoding in the user's outer shell.
941+ "\x1b[<u" ++
939942 "\x1b[?25h";
940943 _ = posix.write(posix.STDOUT_FILENO, restore_seq) catch {};
941944 }