mojira.dev
MC-258708

Deleting candidate CJK words in IME also deletes text already entered

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.

github

-------------------------

当我删除中文候选词时,已经输入的字被删除

fcitx的开发者表示这是mc的问题

Attachments

Comments 12

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.

I cannot reproduce this issue. Can you give a video?

This problem had already appeared since 1.13

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 

2 more comments

@Brain81505 they use fcitx5; GitHub repository: https://github.com/fcitx/fcitx5

Ok, thank you, now I can reproduce now 🙂

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!

tksmly

(Unassigned)

Community Consensus

Platform

Normal

Input, Internationalisation

1.19.3, 1.19.4, 1.20.4, 23w51b, 24w06a, 1.21

Retrieved