From 78d0cc40a336b041349d862bf99db6d2e542cb79 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 2 Feb 2023 06:14:34 +0530 Subject: [PATCH] Fix readSelectionFromPasteboard not actually inserting the text --- glfw/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index fc6348886..1a750f952 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -1632,7 +1632,7 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) { _glfwInputKeyboard(window, &glfw_keyevent); } debug_key("Sending text received in readSelectionFromPasteboard as key event\n"); - GLFWkeyevent glfw_keyevent = {.text=utf8}; + GLFWkeyevent glfw_keyevent = {.text=utf8, .ime_state=GLFW_IME_COMMIT_TEXT}; _glfwInputKeyboard(window, &glfw_keyevent); return YES; }