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 ? 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(); }