-
Notifications
You must be signed in to change notification settings - Fork 6
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
Change symbol candidate tab with the space bar #7
Comments
I'm not familiar with Array IME. The described behaviour looks like special logic from other Array IME software. Is that a crucial feature? |
This is part of the symbol input of Array30, because there are more than 10 symbols in each type. We need to use space bar to switch the symbol combination tabs. In current behavior, there is no way to switch the symbol combination tabs by keyboard (the arrow keys does not work). The way to work around is clicking arrows by mouse. Thank @archerindigo to bring the correct symbol combination tab for rime-array, and we almost there. I am really appreciated this, and I will test more on rime-array. Thanks. :) |
Currently you can use the common rime logic (page up/ page down) to switch pages. Sorry I am currently on vacation and will look deeper into this few days later. |
Now I understand the issue better. Give the default key binding a try. Instead of the space key, |
This is not a specific feature for Furthermore, using space bar to switch the candidates tab is really general for traditional Chinese input methods. At least following OS + IME use
I think one of the reason, to use I really enjoy both your work on Rime and Rime-Array. |
For entering Chinese characters, it is unnecessary to use spacebar to show next page of candidates because of the low redundant rate of Array. In fact, the current spacebar behavior improves efficiency to choose the first candidate. For array symbol input (currently as affix array30_wsymbols), indeed using spacebar to show next page of candidates is better and it is the behavior of many other Array input method on other IMEs. So the objective is: to override spacebar behavior when It is quite easy to override the spacebar behavior by using key_binder
However, if we put this key binding in I'm not sure whether it is supported to let the main input (array30) method to respect the key_binder options set in the secondary method (array30_wsymbols) when the main method calls it out. To my understanding, only segmentors and translators of the secondary method would be respected. @lotem can you clarify this a bit? |
Thanks @archerindigo to provide a way to solve this, and there is something I want to clarify.
Array is by default using space bar to switch the candidates tabs, and if there still be redundant candidates more than ten, but in really rare case. If it is possible to make space bar to change candidate by option, and everything will become wonderful. 😄 |
OK. This comment is for explaining how the input schema dependencies work. When the engine is loaded with schema:
schema_id: array30_wsymbols
name: "行列30 W+數字符號組"
version: "1.0"
translator:
dictionary: array30_wsymbols
prism: array30_wsymbols Since we already have the other parts, lets keep them for testing purpose, to run The configuration that actually takes effect is all here: There are two techniques for overriding the main configuration to get different behaviours. 1. reusable patchWrite the config diffs in a YAML file, and refer to it in 2. a new config that extends the main input schemaWrite the config diffs in a new input schema, and Note: The following example illustrates both techniques: |
This is the acurate solution to using space bar for the next page: Undoubtedly, the dedicated For best efficiency, different software provides different solutions. PC IMEs like Microsoft Zhuyin uses the space key to toggle through pages of candidates; I believe this practice is first found in Japanese IMEs. But these practices are not necessarily followed in other IME software especially in the mobile version. Most of the popular Pinyin IMEs chose The choice of the non-encoding keys and how they behave is not part of the IME design when speaking of Array, Cangjie, etc; it's more of a choice of the IME software. This is my personal view. Keys for editing and selecting candidate make a part of the user's muscle memory. For that reason they have better be consistent for users of multiple IMEs. For the same reason, IME platforms should also consider implementing consistent default key binding for most IMEs. Patches that change the common key binding can be used as a feature diagonal to input schema. |
Thanks for the explanation. To conclude, it is not very feasible to change the behavior of spacebar only for typing Instead one can change the key binding for the whole Array method. One simple way is to add a patch file
No change to the current source is required. |
More consisely add a new key binding: # array30.custom.yaml
patch:
key_binder/bindings/+:
- { when: has_menu, accept: space, send: Page_Down } |
The custom yaml config with patch setting works perfect. Thanks a lot. |
I apologize and sorry about that the issue is closed without fully testing. There are some other issues with before configures, and the solution is not fix the problem perfectly, such that I reopen the issue. If I use the config aforementioned. The word with exactly selection can not be chosen. The expected output The output with previous config The selection logic of Array
|
I don't remember in |
This is not correct, we can look up the key code here Others are prefix combination not the exactly one, and the number keys are the shortcut to select some words which has next key in the column. By the way, this is the beautiful design of Array. People always can look the candidate's order to learn how to type quick or to guess the exactly key code for some words. |
Ok. I think you're referring to the special code handling. Special code in rime-array are arranged as the first candidate in menu. Unlike some other IMEs like gcin, Windows, which hide them from candidate menu and handle them specially. Therefore, you still have to retain the original binding of The number position of short-code is also currently not handled due to a number of reasons. If you care about the special-code and short-code handling more than the menu page switching with |
Thanks @archerindigo, I will try to connect the author of Onion Array30, and if he is willing to share his configure, I will make a PR to fix this. |
That counterdicts your previous statement:
That was why I thought it was important to ask if space is used for different functions depending on context.
|
Yes, now I know the different context meaning, I just summarize the condition and help people to learn more if someone is interested in this issue. There are two context.
In Array, the It is true that |
Once the candidate window is open, the space bar will change the candidate tab, but not to choose the candidate words.
Here is the expectation
w11 -> ,
w1 space 1 -> …
w1 space -> ( nothing output and the candidate window will be the tab starts with … )
This is the current result
w11 -> ,
w1 space -> ,
The text was updated successfully, but these errors were encountered: