Sorry for the late followup. Kenichi Handa wrote:
... Thai input method have to distinguish these two: (1) surrounding text is supported by the client but the previous character doesn't exist. (2) surrounding text is not supported by the client. In the case of (2), Thai input method have to fallback to buffering method (i.e. keep typed characters in preedit area to assure to commit only a valid character sequence).
I was wondering if m17n-lib could somehow handle the fallback to preedit rather than having to implement two sets of input logic in the input map (one for surrounding text and one for without). For example si-wijesekera.mim currently still assumes surrounding text and so doesn't work in KDE or XIM apps. But perhaps it is non-trivial to infer preedit from proceeding input?
Jens