IME Keyboard input collision - (Enter to Autocomplete vs Enter to Convert characters with IME)

I posted this feature request the day before yesterday

Apart from the feature request, there is a problem about the keyboard input event with IME. Developers may have already known this.

“Enter for Autocomplete” and “Enter for Converting characters with IME” collide.

like this
JapaneseEnterEvent

As I explained on the feature request post above link, there is the same problem in Command palette.

EnableEnglishCommands

so far, we mostly do like this or struggle with autocomplete using mouse.
avoidEvenet

I’m not a programmer. So I don’t know much about this kind of problem and can’t explain it well.

But I researched this keyboard input event problem. As a result, I found maybe related posts or issues on the Codemirror repo. If someone knows about this, please help to explain. and I hope developers to make a patch for this.

It may be necessary to distinguish between the Enter when converting with IME and the Enter except for the former.

Environment

OS : macOS catalina (10.15.7)
IME : both of Google Japanese IME and MacOS’s default IME
Obsidian : insider v0.10.1 (installer v0.9.3)

1 Like

Steps to reproduce

  • Create two notes with Japanese names, for example:
    • こんにちは (= good morning)
    • こんばんわ (= good evening)
    • (I would like to do incremental search by typing こん and select こんばんわ)
  • Select any other note
  • Press Cmd/Ctrl-O to open the original note
  • Type こん - which requires typing return key to specify the string, which is the standard behaviour of Japanese IME in most operatiing systems
  • Obsidian also took this return key input as selecting the first candidate in the result of the incremental search (こんにちは).

Expected result

When specified こん (or a substring), i expect Obsidian to perform incremental search only and show the results - こんにちは and こんばんわ only, not open the file yet - because I haven’t finished typing

Actual result

It opens the first candidate as if I have pressed return key at the end of the string. The return key I typed was to terminate IME conversion, not for Obsidian.

Workaround

If I complete the IME session by not Return key but any other keys - for example selecting one of IME conversion candidates by a number, Obsidian is not confused by the IME conversion session termination and the incremental search works well.

Environment

MacOS 10.14.6 and its built-in Japanese IME (Kotoeri)
Obsidian 0.9.10

Thanks. Does this happen with other IMEs?

I’m not using any other IMEs so I’m not sure if this is specific to Kotoeri or not.

I think this problem will occur with any Japanese IME.
I confirmed that it happened with both of Google Japanese IME and MacOS default IME.

this problem seems to be fixed in v0.10.2. thanks!!:relaxed: