zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.77k stars 3.15k forks source link

Inputting Japanese Characters in the Zed Terminal vs. iTerm2 #9900

Open aose-yuu opened 8 months ago

aose-yuu commented 8 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Terminal Differences

When attempting to input Japanese characters in the Zed terminal, users must follow a specific sequence of steps.

Zed

First, they must switch from English input mode to Japanese input mode. After entering Japanese input mode, they can begin typing Japanese characters. However, the characters will not be displayed in the terminal as they are being typed. To navigate through the conversion candidates, users must use the tab or space key. When they are ready to confirm the desired conversion, they must switch back from Japanese input mode to English input mode. Only then will the previously entered Japanese text be reflected in the terminal. It is worth noting that the Mac's built-in auto-conversion feature can help provide somewhat appropriate conversions during this process.

iTerm2

In contrast, iTerm2 offers a more intuitive and user-friendly experience when inputting Japanese characters. Users can seamlessly switch between English and Japanese input modes without experiencing any issues with character display or input confirmation. As users type Japanese characters, the characters are immediately displayed in the terminal, providing real-time visual feedback. Users can navigate through the conversion candidates using the space or tab key, just as they would in other applications. When the desired conversion candidate is highlighted, pressing the enter key confirms the selection without inserting a new line. The confirmed Japanese text is seamlessly integrated into the existing line. Users can continue typing and converting Japanese characters as needed, freely switching between English and Japanese input modes without any disruption to the input process or character display. iTerm2's handling of Japanese input provides a more seamless and efficient user experience compared to the Zed terminal. The immediate display of characters and the ability to confirm conversions without inserting new lines make the process of inputting Japanese text in the terminal more natural and consistent with other applications on the Mac.

Reproduction Steps for Zed Terminal:

  1. Open the Zed terminal application.
  2. Switch the input mode from English to Japanese.
  3. Begin typing Japanese characters. (Note that the characters will not be displayed in the terminal as you type.)
  4. Use the tab or space key to navigate through the conversion candidates.
  5. When you are ready to confirm the desired conversion, switch the input mode back from Japanese to English.
  6. Observe that the previously entered Japanese text now appears in the terminal.

Reproduction Steps for iTerm2:

  1. Open the iTerm2 application.
  2. Switch the input mode from English to Japanese.
  3. Begin typing Japanese characters. As you type, the characters will be immediately displayed in the terminal, providing real-time visual feedback.
  4. Use the space or tab key to navigate through the conversion candidates.
  5. When the desired conversion candidate is highlighted, press the enter key to confirm the selection. The confirmed Japanese text will be seamlessly integrated into the existing line.
  6. Continue typing and converting Japanese characters as needed, freely switching between English and Japanese input modes without any disruption to the input process or character display.

Environment

Zed: v0.128.3 (Zed) OS: macOS 13.6.1 Memory: 64 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Zed

https://github.com/zed-industries/zed/assets/84386322/c2245aeb-31ac-42da-ae3f-61610a7f2db2

iTerm2

https://github.com/zed-industries/zed/assets/84386322/df3d27c1-73e0-4226-8a8e-ed59f9847d23

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

jansol commented 8 months ago

Another related issue affecting everything in Zed (terminal, buffers, fields for command palette, search etc) is that normally you'd be able to use the arrow keys to change a substring of the candidate. However instead of arrow keys getting sent to the IME, they are sent to the underlying widget and mess up the insertion position of the IME candidate.

weensy commented 8 months ago

here is a japanese user who strongly agrees with this. 🙋

sinyo-matu commented 7 months ago

same here

yasainet commented 4 months ago

I too am hoping that the Japanese input will be accurate in zed's Terminal!

juninaba commented 1 month ago

same here