Juergen Spitzmueller schrieb: >In the qt version, I can type neither Umlauts (ä, ö, ü) nor sharp s (ß) > >-dbg any gives for "ä": > >Press key 65535 text "ä", ascii "228" >sym empty in getSymbolName() >getSymbolName() -> ä >KeySym is ä > Kornel and I had the same problem, but Kornels solution does not work for me, so I have the attached hack.
Herbert -- http://www.educat.hu-berlin.de/~voss/lyx/
Index: lib/languages =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/languages,v retrieving revision 1.15 diff -u -r1.15 languages --- lib/languages 3 Jul 2002 14:18:31 -0000 1.15 +++ lib/languages 20 Nov 2002 19:55:39 -0000 @@ -27,8 +27,8 @@ galician galician "Galician" false iso8859-1 gl_ES "" # There are two Galicia's one in Spain one in E.Europe. Because of # the font encoding I am assuming this is the one in Spain. (Garst) -german german "German" false iso8859-1 de "" -ngerman ngerman "German (new spelling)" false iso8859-1 de "" +german german "German" false iso8859-15 de "" +ngerman ngerman "German (new spelling)" false iso8859-15 de "" greek greek "Greek" false iso8859-7 el_GR "" hebrew hebrew "Hebrew" true cp1255 he_IL "" #hungarian hungarian "Hungarian" false iso8859-2 "" "" Index: src/lyxfunc.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v retrieving revision 1.382 diff -u -r1.382 lyxfunc.C --- src/lyxfunc.C 17 Nov 2002 08:32:07 -0000 1.382 +++ src/lyxfunc.C 20 Nov 2002 19:55:44 -0000 @@ -185,6 +185,13 @@ if ((action != LFUN_CANCEL) && (action != LFUN_META_FAKE)) { // remove Caps Lock and Mod2 as a modifiers action = keyseq.addkey(keysym, (state | meta_fake_bit)); + +/////////// I need this to get shift Umlaut + string const s(keyseq.print()); + if ((s == "S-Ä") || (s == "S-Ö") || (s == "S-Ü")) + action = LFUN_UNKNOWN_ACTION; +////////// + lyxerr[Debug::KEY] << "action now set to [" << action << "]" << endl; } Index: QLyXKeySym.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLyXKeySym.C,v retrieving revision 1.10 diff -u -r1.10 QLyXKeySym.C --- QLyXKeySym.C 20 Oct 2002 01:48:27 -0000 1.10 +++ QLyXKeySym.C 20 Nov 2002 20:03:32 -0000 @@ -33,6 +33,8 @@ void QLyXKeySym::set(QKeyEvent * ev) { key_ = ev->key(); + if (key_ == 0) + key_ = ev->ascii(); text_ = ev->text(); } @@ -62,8 +64,11 @@ string sym(qkey_to_string(key_)); if (sym.empty()) { - lyxerr[Debug::KEY] << "sym empty in getSymbolName()" << endl; - sym = text_.latin1(); + lyxerr[Debug::KEY] << "sym empty in getSymbolName() for key " << key_ +<< endl; + if (text_.length()) + sym = text_.latin1(); + else + sym = "none"; } lyxerr[Debug::KEY] << "getSymbolName() -> " << sym << endl; return sym; @@ -72,8 +77,12 @@ char QLyXKeySym::getISOEncoded() const { - lyxerr[Debug::KEY] << "getISO returning " << text_.latin1()[0] << endl; - return text_.latin1()[0]; + if (text_.length() > 0) { + lyxerr[Debug::KEY] << "getISO returning " << text_.latin1()[0] << endl; + return text_.latin1()[0]; + } + lyxerr[Debug::KEY] << "getISO returning 0" << endl; + return 0; } Index: src/frontends/qt2/qlkey.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qlkey.h,v retrieving revision 1.14 diff -u -r1.14 qlkey.h --- src/frontends/qt2/qlkey.h 20 Nov 2002 16:46:17 -0000 1.14 +++ src/frontends/qt2/qlkey.h 20 Nov 2002 19:55:51 -0000 @@ -36,8 +36,8 @@ return true; // AltGr becomes Key_unknown on at least one keyboard - case Qt::Key_unknown: - return true; +// case Qt::Key_unknown: +// return true; } return false; }