Auto-commit whenever possible
Created by: bochecha
An IBus Cangjie user just told me about how that could be interesting.
Basically, the idea is that for every key stroke, we could try to get all the characters which code starts with the previously input keys in the background. If there is only one, just commit it automatically, and treat the last key stroke as the first of a new input.
Let's take an example to make it clearer...
First, let's assume that the set of all possible characters is:
Characters | Codes |
---|---|
日 | a |
明 | ab |
杲 | ad |
The sequence of events is as follows:
- the user inputs
a
- the user inputs
b
- at this point, the previous input is
a
- we check for the number of characters with a code starting with
a
: there are 3 - 3 is more than 1, so we do nothing
- at this point, the previous input is
- the user inputs
c
- at this point, the previous input is
ab
- we check the number of characters with a code starting with
ab
: there is only 1 - we automatically commit 明 and consider that the last input (
c
) is the start of a new input
- at this point, the previous input is
Basically, at step 3, we act as if the user had pressed ab
then space
then c
.
I have two problems with this suggestion:
- Doing queries for each input key might slow down typing too much. That needs to be tested carefully.
- Automagically committing text might be very confusing for unsuspecting users? We'd need to have users test it.