Composición IME: La tecla Intro envía el mensaje en lugar de confirmar la entrada

There’s a bug when using a Chinese Input Method Editor (IME) to type English characters (e.g., typing words without switching the IME off). Normally, pressing Enter means “do not select any candidate and directly input the content in the buffer.” However, in the chat interface, this is interpreted as “send message,” causing this bug.

Expected Behavior:

  • User types English letters using Chinese IME (e.g., typing “hello”)
  • IME displays candidate word list
  • User presses Enter, expecting to: confirm the original typed letters without selecting any candidates

Actual Behavior:

  • Enter key is captured by the chat interface, directly triggering the “send message” function
  • This causes the IME buffer content to be incorrectly sent, or sends an incomplete message

Root Cause:

This is a keyboard shortcut conflict between two levels:

  1. IME level: Enter = confirm current input (composition)
  2. Application level: Enter = send message

The chat application is not properly handling the IME’s “composition state,” causing it to intercept the Enter key event while the IME is still processing input.


This is a video demo/repro of the bug:

Every time I press Enter key, a new message has been sent.

1 me gusta

An user in my community has posted an Userscript that solved this, might be helpful: 私聊聊天优化建议 - #17 by Haleclipse - 运营反馈 - LINUX DO

Does it help to change the preference to “send by ctrl + Enter”? Then this could be an easier workaround.

Here on Meta, you can find that at https://meta.discourse.org/my/preferences/chat

1 me gusta

That should fix it once merged:

Note that I tried on google.com too for example, and the first choice won’t work with enter, you need to use 1 for it to work.