mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
Stop requesting keyboard event types
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user