What happened?
When typing in Korean (or likely other CJK languages that use an Input Method Editor - IME), the composition process of characters is not displayed in real-time within the Gemini CLI. The complete, composed character only appears after the composition is finalized (e.g., by typing the next character or a space). This behavior is observed specifically in the Gemini CLI, while other applications, including the iTerm2 terminal itself, handle IME composition correctly and show the intermediate characters as they are being typed.
What did you expect to happen?
This suggests the issue lies with how the Gemini CLI application handles standard input, likely using a line-buffered or block-buffered approach, rather than processing raw key events. This results in a frustrating user experience for users typing in these languages.
To Reproduce:
- Set up the macOS input method to "Korean - 2-Set Korean".
- Run the Gemini CLI application in a terminal (e.g., iTerm2).
- Attempt to type a Korean word, for example, "안녕하세요" (annyeonghaseyo).
- As you type the keys for the first character '안' (ㅇ, ㅏ, ㄴ), the intermediate forms (ㅇ, 아) are not shown. Only the fully composed character '안' appears once the composition is complete.
Expected Behavior:
The CLI should display the character composition process in real-time, just as it appears in other standard text input fields on macOS. For example, when typing '안', the user should see ㅇ, then 아, and finally 안 as they press the corresponding keys.
Actual Behavior:
The CLI remains blank during the composition of a character. The fully formed character only appears after it has been finalized by the IME.
Environment:
- Operating System: macOS (e.g., macOS Sonoma 14.5)
- Terminal: iTerm2 (or standard macOS Terminal)
- CLI Version: [Please insert your Gemini CLI version here. You can often find this with a --version flag]
Suggested Solution:
The input handling mechanism of the Gemini CLI should be updated to better support rich, interactive input. This might involve switching from a simple line-reading loop to a library that can handle raw terminal input (like readline, ncurses, or a similar crate/library depending on the implementation language), allowing it to process and display IME composition events as they occur.
Client information
Details
$ gemini /about
# paste output here
Login information
No response
Anything else we need to know?
No response
What happened?
When typing in Korean (or likely other CJK languages that use an Input Method Editor - IME), the composition process of characters is not displayed in real-time within the Gemini CLI. The complete, composed character only appears after the composition is finalized (e.g., by typing the next character or a space). This behavior is observed specifically in the Gemini CLI, while other applications, including the iTerm2 terminal itself, handle IME composition correctly and show the intermediate characters as they are being typed.
What did you expect to happen?
This suggests the issue lies with how the Gemini CLI application handles standard input, likely using a line-buffered or block-buffered approach, rather than processing raw key events. This results in a frustrating user experience for users typing in these languages.
To Reproduce:
Expected Behavior:
The CLI should display the character composition process in real-time, just as it appears in other standard text input fields on macOS. For example, when typing '안', the user should see ㅇ, then 아, and finally 안 as they press the corresponding keys.
Actual Behavior:
The CLI remains blank during the composition of a character. The fully formed character only appears after it has been finalized by the IME.
Environment:
Suggested Solution:
The input handling mechanism of the Gemini CLI should be updated to better support rich, interactive input. This might involve switching from a simple line-reading loop to a library that can handle raw terminal input (like readline, ncurses, or a similar crate/library depending on the implementation language), allowing it to process and display IME composition events as they occur.
Client information
Details
Login information
No response
Anything else we need to know?
No response