Jump to content

[1.16] Disable IME when open chat screen


Zemelua

Recommended Posts

I'm trying to make Japanese input easier now. It may not be related to Minecraft, but I have two questions.

1. How can I force IME to be enabled when the chat screen is opened and disabled when it is closed?

2. The character string being input (before conversion) in IME will not be displayed on the chat screen (it will be displayed after confirmation). For this reason, I want to get the string I'm typing and add it to ChatScreen.inputField. How can I get it?

public static void onChatOpen(GuiOpenEvent event) {
	if (event.getGui() instanceof ChatScreen) {
		// enable IME, how?

		// InputContext.getInstance().setCompositionEnabled(true); <- always throw exception...
	}
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.