From 25c4e2e451fed80d8a6e2b43be6a59d8ca315f1e Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sat, 6 May 2023 14:05:28 +0300 Subject: [PATCH] On macOS, fix `key_up` being ignored without IME Fixes: d15feb5cfa (On macOS, fix empty marked text) --- CHANGELOG.md | 1 + src/platform_impl/macos/view.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce34648c..b83abe2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ And please only add new entries to the top of this list, right below the `# Unre - On Wayland, add `Window::drag_resize_window` method. - On Wayland, drop `WINIT_WAYLAND_CSD_THEME` variable. - Bump MSRV from `1.60` to `1.64`. +- On macOS, fix `key_up` beind ignored when `Ime` is disabled. # 0.28.4 diff --git a/src/platform_impl/macos/view.rs b/src/platform_impl/macos/view.rs index 365f151e..ef03dd7a 100644 --- a/src/platform_impl/macos/view.rs +++ b/src/platform_impl/macos/view.rs @@ -549,7 +549,7 @@ declare_class!( self.update_potentially_stale_modifiers(event); // We want to send keyboard input when we are currently in the ground state. - if self.state.ime_state == ImeState::Ground { + if matches!(self.state.ime_state, ImeState::Ground | ImeState::Disabled) { #[allow(deprecated)] self.queue_event(WindowEvent::KeyboardInput { device_id: DEVICE_ID,