-
Notifications
You must be signed in to change notification settings - Fork 16
The pre-edit is non-eager | some pending actions only happen after space is pressed #4
Description
This discussion on this issue actually started when I was reporting an issue with ibus-typing-booster. But the issue is actually with ibus-m17n itself.
ibus-m17n waits before performing any action like deleting, moving, inserting, etc. until it has confirmed the input sequence.
Example:
If I map:
a => a
b => b
bq => B
and set a rule which says: if 'b' comes after 'a', insert 'l' before that 'a'
So when I type 'ab', I'd expect to see 'alb'.
The problem is, when I write 'b' the engine is still waiting to confirm whether I meant 'b' or 'bq'. The engine will not perform any move/insert operations until it has confirmed what I want write. So when I write 'ab' I see 'ab'. But if I press space after that, 'alb' will be committed. This behavior is surprising, and confusing for users.
For developers, they have to write extraneous mappings if they want to get rid of that behavior.
So, if I also mapped: ab => alb, then it would show the expected output.
However, it is not practical to write lots of extraneous mappings for a keyboard layout.
When writing the bn-khipro-m17n layout I had to put in lots of extraneous mappings, cause it was confusing users. Moreover, I'm hesitant to add calculation based features further, since it will need me to add loads of more extraneous mappings.
My suggestion
Make the behavior of ibus-m17n eager. Make it preview what will be committed if space is pressed then and there. The ibus-m17n engine will recalculate if the user types something else that does not require the operations. Like, for the above example, if the user types 'abq' the modified engine will recalculate the preedit buffer and show 'aB'.