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

Need a candidate column like pinyin to follow the position #114

Open
yueduz opened this issue Jul 1, 2022 · 6 comments
Open

Need a candidate column like pinyin to follow the position #114

yueduz opened this issue Jul 1, 2022 · 6 comments
Assignees

Comments

@yueduz
Copy link

yueduz commented Jul 1, 2022

下图是ibus-libpinyin输入法的候选栏位置,他的锚点对齐左起第一条竖线.好处是在按下空格提交前,候选栏位置固定.
The picture below shows the position of the candidate column of the ibus-libpinyin input method. Its anchor point is aligned with the first vertical line from the left. The advantage is that the position of the candidate column is fixed before pressing the space to submit.
截图 2022-07-01 18-43-38
下图是ibus-table输入法的候选栏位置,他的锚点对齐左起第二条竖线.这样不好的一点是每键入一个字符都会移动候选栏的位置,容易眼花.
The following picture is the position of the candidate column of the ibus-table input method, and its anchor point is aligned with the second vertical line from the left. The bad point is that every time you type a character, the position of the candidate column will be moved, which is easy to dazzle.
截图 2022-07-01 18-44-05
Because my English is very poor, I use goole translation. I am very sorry if the expression is unclear

@yueduz yueduz changed the title 需要像拼音一样的候选栏跟随位置 Need a candidate column like pinyin to follow the position Jul 2, 2022
@mike-fabian
Copy link
Owner

The input method has no control over that, ibus tries to put the candidate window close to the cursor position. Sometimes this fails because of bugs in ibus and/or the program typed into or the desktop.

And sometimes, if the candidate window is bigger than a certain size, it might be moved a bit to fit to the screen better. It could be that your pinyin candidate window is more to the left just because it is wider.

But neither ibus-libpinyin nor ibus-table have any control over the position of this candidate window.

I attach a video here where I type into gedit on a Gnome Xorg session using various ibus input methods

  • ibus-libpinyin
  • ibus-table erbi-qs
  • ibus-anthy (Japanese)
  • ibus-typing-booster

In all cases, the candidate window follows the cursor position.

Peek.2022-07-03.21-47.mp4

@yueduz
Copy link
Author

yueduz commented Jul 4, 2022

This is what I recorded with ibus-libpinying gedit under Gnome Xorg, he did fix it at the beginning
https://user-images.githubusercontent.com/1448159/177064298-248be4fa-5dc9-4705-9f7d-07fd25715598.mp4

@yueduz
Copy link
Author

yueduz commented Jul 4, 2022

ibus/ibus#2180 (comment)
Hope this link is useful

@mike-fabian
Copy link
Owner

ibus/ibus#2180 (comment) Hope this link is useful

Peng Wu (epico) writes there:

The input method should call ibus_engine_update_preedit_text with cursor_pos = 0, to show the panel in the beginning of the preedit text.

ibus-libpinyin does this only when the display style Compact is chosen, not for the display style Default:

Peek.2022-07-04.11-23.mp4

@mike-fabian
Copy link
Owner

For the display style Compact, only the ASCII input is shown in the preedit, not the Chinese characters. And the current cursor position within the ASCII is shown by an added vertical bar. The “real”, blinking cursor is set to the left side of the preecit (cursor_pos=0) which is why the candidate list doesn’t move.

Maybe ibus-table could add such an option.

It will be quite difficult though because of the commit_to_preedit feature of ibus-table. If you type the keybinding for commit_to_preedit (By default Control+Shift_R and Control+Shift_R) then you commit Chinese characters to the preedit.

So with a Compact style like in ibus-libpinyin you would end up having a mixture of Chinese characters and typed ASCII input (or typed radicals if using something like Cangje5) in the preedit. And that extra vertical bar somewhere indicating the “real” cursor position and having that wrong, fake blinking cursor position always at the left to force the candidate window left.

The Compact style in ibus-libpinyin is probably called “compact” because it does not show the typed keys on top of the candidate window but shows them in the preedit instead, thus saving one row of text in the candidate window.

I could implement a similar Compact style in ibus-table to save one row of space in the candidate list and show the information in the preedit instead (including a vertical bar for the “real” cursor position) and also force the blinking cursor left in order to force the candidate list to the left. Because of the possible mixture of ASCII and Chinese characters or radicals and Chinese characters for Cangjie such a Compact style would look a bit messy and inconsistent in ibus-table, I am not sure whether this would be really helpful.

@yueduz
Copy link
Author

yueduz commented Jul 4, 2022

I find it helpful. The candidate column is more messy when running around

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

No branches or pull requests

2 participants