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

Auto-commit whenever possible #12

Open
bochecha opened this issue Oct 23, 2013 · 0 comments
Open

Auto-commit whenever possible #12

bochecha opened this issue Oct 23, 2013 · 0 comments

Comments

@bochecha
Copy link
Member

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:

  1. the user inputs a
  2. 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
  3. 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

Basically, at step 3, we act as if the user had pressed ab then space then c.

I have two problems with this suggestion:

  1. Doing queries for each input key might slow down typing too much. That needs to be tested carefully.
  2. Automagically committing text might be very confusing for unsuspecting users? We'd need to have users test it.
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

1 participant