[immodule-qt] QSimpleInputContext is now available

Lars Knoll lars at trolltech.com
Thu Jul 29 11:06:18 EEST 2004


On Wednesday 28 July 2004 18:42, Kazuki Ohta wrote:
> Hi, Lars.
>
> > On Friday 23 July 2004 00:42, Kazuki Ohta wrote:
> > > I've committed QSimpleInputContext which is table based InputContext
> > > for supporting Dead/Multi key. (r31)
> > > But the table is not complete yet(only dead key related stroke is
> > > registered), so I'm going to add entries for Multi key.
> > >
> > > see :
> > > http://freedesktop.org:8080/svn/immqt/immodule-qt-x11/trunk/src/input/q
> > >si mp leinputcontext.cpp
> >
> > One idea: Instead of using a hardcoded lookup table, to compose the
> > sequence into Unicode, you might want to use QString::compose() in Qt 3,
> > and QUnicodeTables::ligature(ushort c1, ushort c2) in Qt 4.
> >
> > Best regards,
> > Lars
>
> I try to use QString::compose, but it has some problem.
>
> First, we cannot confirm if composition occurs or not, therefore cannot
> detect the end of composition.
> That is, we cannot decide what timing we should commit the String.

As far as I know, a dead key works only on the next following character, so 
you know that there are at most 2 characters taking part.

> Next, QString::compose seem not to be able to handle Multi key (Example
> code is attached).

No it can't. For multi keys you need a lookup table.

> Anyway, QSimpleInputContext must have hardcoded look up table.
>
> #for future, we should load X's composing table dynamically (Yamaken
> suggest this to me)

I don't think this will work. X's composing table is most certainly not 
exported from Xlib. And if it is, it's an external symbol one should not rely 
on.

Best regards,
Lars



More information about the immodule-qt mailing list