libpinyin / ibus-libpinyin

GNU General Public License v3.0
627 stars 90 forks source link

Numbers for candidates sellection in shift #408

Open FauveNoir opened 1 year ago

FauveNoir commented 1 year ago

Hello,

I am user of dvorak-oriented french layout BÉPO. And, in this layout, the numbers in the number’s line are not in direct access. So when I push a number (in the number’s line not in the numpad), the corresponding candidate is not selected, because Intelligent Pinyin make a difference between a key in direct access and a key in shift.

So, in cases where the numpad is not available, it’s not possible to select with the keyboard a desired candidates. Then I would be great if the numbers produced with a combination of keys could be interpreted as if they was produced in direct access.

However, it would be great if it was an option to let the user associates himself a custom symbol to each candidate number in the configuration.

mike-fabian commented 1 year ago

ibus-typing-booster has the same problem with its default settings. The default setting for the command

commit_candidate_6_plus_space is ['6', 'KP_6', 'F6']

and when typing a 6 using the number line on the bepo layout one is actually typing Shift+6 which is not among the key combinations bound to that command.

But, in ibus-typing-booster, this can easily be fixed by adding Shift+6 as another keybinding for that command.

As in this screenshot:

Screenshot

So one way to fix this for ibus-libpinyin would be adding more possibilities to configure key bindings, allow more than one key combination to execute the same command and make more keybindings configurable.

Or, a quick fix/workaround would be to ignore whether the Shift key is pressed when digits are typed while the candidate list is shown.

epico commented 1 year ago

Okay, I just disabled the Shift mask check when press the number key.

URL: https://github.com/libpinyin/ibus-libpinyin/commit/7a7c547a312b00e8e28dde2b010e0db027637162