[immodule-qt] Re: Requirements about filterEvent() (Re: Completing comments and documents)
LiuCougar
liucougar at gmail.com
Wed Aug 11 17:52:48 EEST 2004
On Wed, 11 Aug 2004 14:13:55 +0900, YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> At Wed, 4 Aug 2004 03:49:17 +0100,
> liucougar at gmail.com wrote:
> >
> > On Wed, 04 Aug 2004 11:42:00 +0900, YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> > > At Wed, 4 Aug 2004 03:06:38 +0100,
> > > I've understood that some difficulties are existing without
> > > x11EventFilter. I'll look at your code later.
> > Yeap, I had some real difficulties if only QEvent are utilized.
> > Finally, I got this solution: with some very tricky work around to
> > overcome the "unfriendly" QKeyEvent.
> I think that keyevent_qt_to_scim() is the 'tricky workaround'
> that you said. But why don't you use QKeyEvent::state() and
> QKeyEvent::stateAfter() to extract modifier state simply? In my
> rough understanding about keyevent_qt_to_scim(), it can be
> simplified by these methods.
Yes, keyevent_qt_to_scim() is the "tricky" function. I can not rely on
QKeyEvent::state() and QKeyEvent::stateAfter() because scim requires
the sequence in which the modifer keys are pressed, but in Qt doc, it
says QKeyEvent::stateAfter() Warning: This function cannot be trusted.
So I need a confidential way to deal with the key sequence.
Any idea about how we can improve this in Qt 4?
Regards,
--
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage
More information about the immodule-qt
mailing list