Stop requesting keyboard event types

This commit is contained in:
Charlie Marsh
2026-07-06 15:04:49 -04:00
parent 3426769f03
commit b2f9635dcf
2 changed files with 2 additions and 4 deletions
-3
View File
@@ -305,9 +305,6 @@ pub fn restore_after_exit() -> Result<()> {
if let Err(err) = terminal_stderr::finish() {
first_error.get_or_insert(err);
}
// Discard key events queued while shutdown was in progress so the parent shell does not
// receive CSI-u sequences that were encoded before keyboard reporting was reset.
flush_terminal_input_buffer();
match first_error {
Some(err) => Err(err),
+2 -1
View File
@@ -126,9 +126,10 @@ pub(super) fn enable_keyboard_enhancement() {
let _ = execute!(
stdout(),
DisableModifyOtherKeys,
// Codex exits on key presses, so a matching release can otherwise arrive after shutdown
// and leak into the parent shell.
PushKeyboardEnhancementFlags(
KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES
| KeyboardEnhancementFlags::REPORT_EVENT_TYPES
| KeyboardEnhancementFlags::REPORT_ALTERNATE_KEYS
)
);