-----BEGIN PGP SIGNED MESSAGE----- On Donnerstag, 19. Dezember 2002 00:42, John Levon wrote: > On Wed, Dec 18, 2002 at 11:07:27AM +0100, Kornel Benko wrote: > > action first set to [433] > > action now set to [433] > > What bind file are you using ? > > OK, what is happening is that for me, the first binding with > Qt_Key_unknown happens to have an action of 88 (self insert) and it > works. For you however, it is another one which is a pseudo action that > inserts something else (I suppose). > > Can I ask you, do you always get the same wrong insertion with every > Qt::Key_unknown symbol ?
Always the same. > And, what happens if you change QLyXKeySym operator== to something like > > > > Index: QLyXKeySym.C > =================================================================== > RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLyXKeySym.C,v > retrieving revision 1.15 > diff -u -r1.15 QLyXKeySym.C > --- QLyXKeySym.C 17 Dec 2002 20:54:42 -0000 1.15 > +++ QLyXKeySym.C 18 Dec 2002 23:41:33 -0000 > @@ -107,10 +107,14 @@ > > bool operator==(LyXKeySym const & k1, LyXKeySym const & k2) > { > - // note we ignore text_ here (non-strict ==), because > - // text_ is not filled out by keymap initialisation > + QLyXKeySym const & q1(static_cast<QLyXKeySym const &>(k1)); > + QLyXKeySym const & q2(static_cast<QLyXKeySym const &>(k2)); > > - return static_cast<QLyXKeySym const &>(k1).key() > - == static_cast<QLyXKeySym const &>(k2).key(); > + // we do not have enough info for a fair comparison, so return > + // false. This works out OK because unknown text from Qt will > + // get inserted anyway after the isText() check > + if (q1.key() == Qt::Key_unknown || q2.key() == Qt::Key_unknown) > + return false; > > + return q1.key() == q2.key(); > } IT WORKS!! ... Press key 65535 text "none", ascii "0" keyevent has isNull() text ! KeySym is @NONE@ isOK is 0 Empty kbd action (probably composing) repainting 54,21 1,21 repainting 54,21 1,21 repainting 54,21 1,21 Press key 65535 text "ç", ascii "231" Setting key to 65535, ç KeySym is @NONE@ isOK is 1 isMod is 0 action first set to [-1] action now set to [-1] Key [action=-1][@NONE@] isText for key 65535 isPrint is 1 isText() is true, inserting. ISOEncoded returning value 231 LyXFunc::dispatch: action[88] arg[ç] repainting 54,21 1,21 BufferView::Pimpl::Dispatch: action[88] arg[ç] x[53] y[1085020864] button[1] LyXFunc::dispatch: action[88] arg[ç] Checking if we know [ç] no we don't know [ç] Cannot decode: ç ... Kornel - -- Kornel Benko [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQCVAwUBPgGsALewfbDGmeqhAQF+CAP/e42ztBDx9cfMQk4TZ8p+KSQ/rjT39+0a SK70BvGK9YJIOYhbdAkVrzXQZU4jlF7gyO8vl2T7hgfojiDlEhRwG+A4Ls8yaoAt qCLYZLhSnA4vIGWgw1VtC+67sOOu6XCqLLXbH22Ag+Z7YGSLC3TiD1I/4LWf8Eqs Wkiw3VrJg2c= =pbej -----END PGP SIGNATURE-----