From 418d8503754e4437f9dc475af0d66ae402b1f0b3 Mon Sep 17 00:00:00 2001 From: John Tur Date: Wed, 5 Nov 2025 16:03:36 -0500 Subject: [PATCH] Fix corrupted characters being inserted when Alt is pressed (#42033) The Alt+Numpad buffer that's maintained by the input stack is getting corrupted, leading to garbage characters being inserted on keystrokes like Alt+Up. Disable the automatic handling of Alt+Numpad for now until the cause of this corruption is understood. The Alt+Numpad input did not work anyway, so this does not regress anything. Release Notes: - windows: Fixed corrupted characters being inserted when Alt is pressed (preview only) --- crates/gpui/src/platform/windows/events.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/gpui/src/platform/windows/events.rs b/crates/gpui/src/platform/windows/events.rs index a8e5a4300fc61d74f7a8e44fd869d492a9a658e8..e3b50bcebd5fa8edb12e0ca18a15d6e364552f7a 100644 --- a/crates/gpui/src/platform/windows/events.rs +++ b/crates/gpui/src/platform/windows/events.rs @@ -1370,7 +1370,7 @@ fn should_prefer_character_input(vkey: VIRTUAL_KEY, scan_code: u16) -> bool { scan_code as u32, Some(&keyboard_state), &mut buffer_c, - 0x4, + 0x5, ) }; if result_c < 0 { @@ -1415,7 +1415,7 @@ fn should_prefer_character_input(vkey: VIRTUAL_KEY, scan_code: u16) -> bool { scan_code as u32, Some(&state_no_modifiers), &mut buffer_c_no_modifiers, - 0x4, + 0x5, ) }; if result_c_no_modifiers <= 0 {