Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to support the Chinese input method? #75

Closed
longgeek opened this issue Apr 9, 2015 · 5 comments · Fixed by #168
Closed

How to support the Chinese input method? #75

longgeek opened this issue Apr 9, 2015 · 5 comments · Fixed by #168

Comments

@longgeek
Copy link

longgeek commented Apr 9, 2015

as title

@paradoxxxzero
Copy link
Owner

I have absolutely no idea of how it works sorry, I'm open to anything to support this.

@longgeek
Copy link
Author

longgeek commented May 7, 2015

same #47

@PeterCxy
Copy link
Contributor

The updated fork of xterm.js (https://github.com/sourcelair/xterm.js) supports IME correctly. Maybe we can just pull in the new version as dependency.

@paradoxxxzero
Copy link
Owner

Yeah that would be nice, in fact it would be really nice to merge back what can be useful for everyone but it seems the term.js/xterm.js has diverged a lot so it will be a tedious process.

PeterCxy added a commit to PeterCxy/butterfly that referenced this issue Jun 3, 2018
this fixes paradoxxxzero#75 and paradoxxxzero#47, two bugs originated long long ago.

1. Added support for IME events `compositionstart` `compositionupdate` and `compositionend`.
2. Refactored some code to receive input events from a hidden textarea just as how `xterm.js` now does. This removes the need to set `contentEditable` on the body in order to receive IME compistion events, and also guides the IME input box correctly following the cursor.
3. Fixed CJK rendering. Forces "forceWidth" mode with double width on those known CJK ranges in Unicode. Corrected the placeholder logic of the force width mode. Note that some rare halfwidth CJK characters will still not render correctly without `force-unicode-width` enabled. If you see any issue, place enable the `--force-unicode-width` option.
4. Miscallaneous fixes for some problems after introducing the above change

Tested on Firefox Nightly 62 on Linux and Chromium 67 on Linux, with `fcitx` as input method.
PeterCxy added a commit to PeterCxy/butterfly that referenced this issue Jun 3, 2018
this fixes paradoxxxzero#75 and paradoxxxzero#47, two bugs originated long long ago.

1. Added support for IME events `compositionstart` `compositionupdate` and `compositionend`.
2. Refactored some code to receive input events from a hidden textarea just as how `xterm.js` now does. This removes the need to set `contentEditable` on the body in order to receive IME compistion events, and also guides the IME input box correctly following the cursor.
3. Fixed CJK rendering. Forces "forceWidth" mode with double width on those known CJK ranges in Unicode. Corrected the placeholder logic of the force width mode. Note that some rare halfwidth CJK characters will still not render correctly without `force-unicode-width` enabled. If you see any issue, please enable the `--force-unicode-width` option.
4. Miscallaneous fixes for some problems after introducing the above change

Tested on Firefox Nightly 62 on Linux and Chromium 67 on Linux, with `fcitx` as input method.
@PeterCxy
Copy link
Contributor

PeterCxy commented Jun 3, 2018

I know it's been years but I just completed CJK & IME support for Butterfly on #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants