onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.77k stars 274 forks source link

IME Support #172

Open bryphe opened 5 years ago

bryphe commented 5 years ago

This is tracking IME integration (Japanese input, WinCompose, etc) - currently not supported via GLFW. https://github.com/kovidgoyal/kitty has IME support and is based on GLFW, so it'll be interesting to see how they handle it.

CrossR commented 5 years ago

I think Kitty uses a forked version of GLFW (bumped into it when I was looking into some other stuff) : https://github.com/glfw/glfw/compare/master...kovidgoyal:master.

I can see some stuff like "New Keyboard API" which are potentially how they are achieving it.

somebody1234 commented 5 years ago

For Linux it seems like that's what the IBUS commits do. Although it doesn't say anything about Windows, but it says it's "cross-platform". Hmm 🤔 I guess I'll just test on Windows if I get the time

somebody1234 commented 5 years ago

Actually, seems like it doesn't have support for Windows, so we might have to look into that ourselves

somebody1234 commented 5 years ago

Actually, well... seems like we might be able to just use kovidgoyal's fork? WinCompose and Japanese input working fine for me, only problem is oni2 appears not to be able to render many characters

somebody1234 commented 5 years ago

Well, that and the fact that for e.g. Japanese input the suggestion box appears on the top left of the screen (0, 0)

bryphe commented 5 years ago

Wow, thanks for the help investigating this, @somebody1234 ! Impressive progress. That sounds very promising - might be not too far away... Curious, did you end up building Oni2 against kovidgoyal's fork, or test it separately?

Well, that and the fact that for e.g. Japanese input the suggestion box appears on the top left of the screen (0, 0)

I wonder if there is a way for us to adjust this? Maybe the API allows for positioning it? We'd probably want to arrange it near the cursor directly.

only problem is oni2 appears not to be able to render many characters

Sounds like a separate bug (I would imagine it reproduces w/o the forked GLFW)

somebody1234 commented 5 years ago

:/ haven't actually tested on linux/mac yet, just assuming it will work because it's used in kitty, I can test on Linux today maybe. What I mean though, is that it works on Windows without changing anything, which I'll assume is why kovidgoyal didn't add IME support for Windows? (Sorry if what I said may have been misleading lol)

bryphe commented 5 years ago

Oh got it! I misread 😄 Thanks for clarifying.

Well, that's actually good news in any case. It means that, for Windows, the surface area is probably pretty minimal to enable the IME functionality (just hooking up the positioning API).

ProgramFan commented 3 years ago

We still need this. onivim2 can now display correctly unicode glyphs, but I want ibus support to be able to input Chinese.

nbw commented 3 years ago

I was going to create an issue for this, but I see this one exists. Here is a video comparison of what VSCode does (which is what every app, browser, etc. does) vs onivim for Japanese.

VSCode (normal)

typing japanese

Onivim

The text blow is gibberish. In part because I can't see what I'm typing while I type it.

typing japanese onivim

omasanori commented 3 years ago

I'm an OniVim2 user on Windows and GNU/Linux for months, and this is the major blocker issue for me to recommend OniVim2 to colleagues. I would like to hear any update on it, if any.