I can reproduce the issue in a vanilla environment, so I recreate the issue.
--------------------
When I delete candidate CJK words in IME, Minecraft also handles the backspace event, causing text already entered to be deleted as well
Developers of fcitx said that this should be fixed on Minecraft's side.
-------------------------
当我删除中文候选词时,已经输入的字被删除
fcitx的开发者表示这是mc的问题
Attachments
Comments 12
If this PR is merged, it might be possible to use glfw's implementation to circumvent the problems arising from mc's own implementation.
This has always been a problem, but there are probably too few chinese linux mc players to post an issue
@Brain81505 they use fcitx5; GitHub repository: https://github.com/fcitx/fcitx5
https://github.com/glfw/glfw/pull/2130#issuecomment-1153754529
I found this comment may be relevant: GLFW currently sends key press events to the application even if the X11 event is filtered. If Minecraft already maintains a fork of GLFW, is it possible to add the patch mentioned here temporarily until the proper fix is merged upstream?
lunar1.19.2(reproducible on vanilla1.19.2): https://www.bilibili.com/video/BV1XY4y1c7jr?t=192.7
I thought it's MC-91132 when I was recording this video
Bump. Also reproducible in Minecraft 1.20.4 and 24w06a.
I recompiled and installed glfw from https://github.com/glfw/glfw/pull/2130, with this patch:
diff --git a/src/x11_window.c b/src/x11_window.c
index 12ddca94..57cd7332 100644
— a/src/x11_window.c
+++ b/src/x11_window.c
@@ -1463,6 +1463,8 @@ static void processEvent(XEvent *event)
Time diff = event->xkey.time - window->x11.keyPressTimes[keycode];
if (diff == event->xkey.time || (diff > 0 && diff < ((Time)1 << 31)))
{
+ if (filtered) return;
+
if (keycode)
_glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
as addressed in https://github.com/glfw/glfw/pull/2130#issuecomment-1153754529.
Then, enable "Use System GLFW" in the Minecraft launcher (like HMCL), issue now can be resolved and everything works perfectly!
1.18.2 too.
There are many players from non English speaking countries who need to use fcitx to input their own language, but this problem has not been solved yet.
We just want to play your game happily.