Angus Leeming wrote: > Note that someone posted a minimal immodule patch a month or so ago. (I'm > pretty sure that it was to this list.) Unfortunately, I don't think that > anyone picked it up, or even said thank you. Even more unfortunately, my > trawling of the archive has failed to dig it up.
http://marc.theaimsgroup.com/?l=lyx-users&m=111332961222235&w=2 It's from Iñaki García Etxebarria (patch attached). The patch does the correct thing from all that I know [1], but it only implements accent-caron. It would be great if someone could pick it up and try a general version. Too bad that Iñaki is too busy ... Jürgen [1] mostly from this howto (and not enough to implement it myself :-(): http://www.kde.gr.jp/~asaki/how-to-support-input-method.html
diff -ru ../lyx-1.3.5.old/src/frontends/qt2/QContentPane.C ./src/frontends/qt2/QContentPane.C --- ../lyx-1.3.5.old/src/frontends/qt2/QContentPane.C 2003-12-29 14:54:16.000000000 +0100 +++ ./src/frontends/qt2/QContentPane.C 2005-04-12 19:21:40.000000000 +0200 @@ -100,6 +100,7 @@ setFocusPolicy(QWidget::WheelFocus); setFocus(); setCursor(ibeamCursor); + setInputMethodEnabled(true); // stupid moc strikes again connect(wa_->scrollbar_, SIGNAL(valueChanged(int)), @@ -235,6 +236,30 @@ } +void QContentPane::imStartEvent(QIMEvent *e) +{ + e->accept(); +} + +void QContentPane::imComposeEvent(QIMEvent *e) +{ + e->accept(); +} + +void QContentPane::imEndEvent(QIMEvent *e) +{ + if (!e->text().isEmpty()) { + if (e->text() == "^") { + QKeyEvent *ev = new QKeyEvent (QEvent::KeyPress, + Qt::Key_AsciiCircum, '^', 0, + QString("^")); + keyPressEvent(ev); + delete ev; + } + } + e->accept(); +} + void QContentPane::doubleClickTimeout() { if (!dc_event_.active) diff -ru ../lyx-1.3.5.old/src/frontends/qt2/QContentPane.h ./src/frontends/qt2/QContentPane.h --- ../lyx-1.3.5.old/src/frontends/qt2/QContentPane.h 2003-12-29 14:54:16.000000000 +0100 +++ ./src/frontends/qt2/QContentPane.h 2005-04-12 19:21:40.000000000 +0200 @@ -101,6 +101,10 @@ void wheelEvent(QWheelEvent * e); /// key press void keyPressEvent(QKeyEvent * e); + /// IM events + void imStartEvent(QIMEvent *); + void imComposeEvent(QIMEvent *); + void imEndEvent(QIMEvent *); public slots: void doubleClickTimeout();