소스 검색

wayland: For text, ignore key events when Ctrl is held

Fixes #4695
Ethan Lee 4 년 전
부모
커밋
1a4e2e5ef7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/video/wayland/SDL_waylandevents.c

+ 1 - 1
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);