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 do I use this? #2

Closed
L-as opened this issue Aug 1, 2020 · 2 comments
Closed

How do I use this? #2

L-as opened this issue Aug 1, 2020 · 2 comments

Comments

@L-as
Copy link

L-as commented Aug 1, 2020

I am not experienced with chewing or chinese IMEs, but was wondering how to use this. I ran the executable but I am not sure what I am supposed to do after that. I am using sway if that matters.

@xdavidwu
Copy link
Owner

xdavidwu commented Aug 1, 2020

At compositor side you need wlr-layer-shell, virtual-keyboard-unstable-v1, input-method-unstable-v2 (with keyboard grab) support, sway with swaywm/sway#4932 applied would do.
At client side you need text-input-unstable-v3 support. GTK3 wayland applications with environment variable GTK_IM_MODULE set to wayland use that protocol. GTK3 apps via Xwayland won't work.
With wlchewing running, you will be able to type chinese in text_input_unstable_v3 clients.

In wlchewing, we have two mode, chinese mode and english mode. In chinese mode, you can type chinese with Bopomofo(Zhuyin) phonetic symbols. In english mode, wlchewing currently just forward key events back to client so it would be english like there is no input method in between. You can switch between two mode with ctrl+space or shift. Currently there is no indicator for mode.

In Bopomofo input system, we use QWERTY keyboards and map another layer of our Bopomofo symbols on it. See the image on Wikipedia. You type symbols into the Bopomofo buffer (expressed with both underline and bold in GTK) and if those symbols compose a character, the character is added to another buffer described below, and the symbols are cleared. Tone 1 (the flat one) is expressed by a space. Modern Bopomofo input system (like chewing which wlchewing uses) detects conflicting symbols and automatically replace new one with old one. Modern Bopomofo input system (like chewing) also allow you to type out-of-order within one character by automatically place symbols into legit positions.

The composed word will be in another buffer (expressed with only underline in GTK) which you can change the characters to others with the same pronunciation. When typing more character into this buffer, previous character may change automatically if its pronunciation form a word with current character pronunciation. In wlchewing, you can manually change a character by moving the cursor before it, press down arrow and a panel will appear at bottom. In the panel, if following characters pronunciation forms some possible words, you can change the whole word. Candidates are grouped by length of words and you can navigate among the groups with down arrow key. In a group, navigate among candidates with left and right arrow keys and press enter to select. The character (or word) will be replaced and panel will disappear. Note that you cannot move the cursor to this character selection buffer with any symbols existing in Bopomofo buffer. When you are done with character selection, press enter again and the characters will finally be committed.

For example, if you want to type 雪, you type ㄒㄩㄝˇ (mapped as vm,3), and a character with this pronunciation will appear, likely 雪 itself because this character is most commonly used. You can change it to 鱈 (which has the same pronunciation as 雪) by character selection procedure described above. And finally press enter to commit. You can type multiple characters into character selection buffer at a time, like 雪花 (ㄒㄩㄝˇㄏㄨㄚ , vm,3cj8 , note the space), and commit them together.

@L-as
Copy link
Author

L-as commented Aug 2, 2020

Thanks! This is really helpful.

@L-as L-as closed this as completed Aug 2, 2020
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

No branches or pull requests

2 participants