mike-fabian / ibus-typing-booster

ibus-typing-booster is a completion input method for faster typing
https://mike-fabian.github.io/ibus-typing-booster/
Other
228 stars 16 forks source link

[ENHANCEMENT] There should be a command `commit_and_forward_key` which can be bound to a key binding #461

Closed mike-fabian closed 1 year ago

mike-fabian commented 1 year ago

This is to make it possible to emulate ibus-m17n even more closely.

ibus-m17n commits the preedit when the Left is pressed (the arrow-left key) and it passes the Left key event through.

ibus-typing-booster already has a command commit which can be bound to a key but that command just commits and does not pass the key through (which is on purpose).

Therefore, binding commit to Left makes ibus-typing-booster commit on Left already just like ibus-m17n does, but the cursor is not moved left.

For example, when using hi-itrans with ibus-m17n typing a puts in the preedit. Then, typing Left commits the preedit so one gets |अ as the committed result (where | indicates the cursor position. Compare this to using hi-itrans with ibus-typing-booster while Left is bound to commit: Typing a puts into the preedit. Then typing Left commits but the cursor stays on the right side, so the final result is अ| (where | again indicates the cursor position).

If a new command commit_and_forward_key is introduced, one can bind Left to that command instead of to commit and then ibus-m17n and ibus-typing-booster behave exactly the same when pressing Left, commit and move the cursor left.

mike-fabian commented 1 year ago

Video showing the current behaviour:

https://github.com/mike-fabian/ibus-typing-booster/assets/2330175/5159f7ff-cace-48a5-ac47-d44a58638cca

mike-fabian commented 1 year ago

See also: https://github.com/ibus/ibus/issues/2536#issuecomment-1700986021

mike-fabian commented 1 year ago

Video showing the improved behaviour using the release candidate ibus-typing-booster-2.23.5 from

https://copr.fedorainfracloud.org/coprs/mfabian/ibus-typing-booster/build/6359615/

https://github.com/mike-fabian/ibus-typing-booster/assets/2330175/8fa3602f-451d-4874-8e6c-4b65d363d3eb