From 68816b346b3873ca6424e87bbe98b4c638a6e16b Mon Sep 17 00:00:00 2001 From: vzex Date: Sat, 18 Dec 2021 01:40:58 +0800 Subject: [PATCH] fix bug for ctrl can't use --- src/window/keyboard_manager.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/window/keyboard_manager.rs b/src/window/keyboard_manager.rs index b9615bd..682f420 100644 --- a/src/window/keyboard_manager.rs +++ b/src/window/keyboard_manager.rs @@ -121,8 +121,10 @@ impl KeyboardManager { let key_text = key_event.text; if let Some(ori_key_text) = key_text { let mut key_text = ori_key_text; - if let Some(modify) = key_event.text_with_all_modifiers() { - key_text = modify; + if self.alt { + if let Some(modify) = key_event.text_with_all_modifiers() { + key_text = modify; + } } // This is not a control key, so we rely upon winit to determine if // this is a deadkey or not.