From 1a4e2e5ef7425d44a0faa4ad5535e69f7c0b962c Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Thu, 23 Sep 2021 14:31:54 -0400 Subject: [PATCH] wayland: For text, ignore key events when Ctrl is held Fixes #4695 --- src/video/wayland/SDL_waylandevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index f021c3adc..82df0fb05 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -839,7 +839,7 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard, } if (state == WL_KEYBOARD_KEY_STATE_PRESSED) { - if (has_text) { + if (has_text && !(SDL_GetModState() & KMOD_CTRL)) { Wayland_data_device_set_serial(input->data_device, serial); if (!handled_by_ime) { SDL_SendKeyboardText(text); -- 2.32.0