sym->setText(docstring());
return;
}
+ LYXERR(Debug::KEY) << "Getting key " << ev->key() << ", with text '"
+ << fromqstr(ev->text()) << "'" << std::endl;
+ // This is unsafe because ev->text() is the unicode representation of the
+ // key, not the name of the key. For example, Ctrl-x and Alt-x produce
+ // different texts.
sym->setText(qstring_to_ucs4(ev->text()));
LYXERR(Debug::KEY) << "Setting key to " << sym->key() << ", "
<< to_utf8(sym->text()) << endl;
{
string name = qkey_to_string(key_);
- // e.g. A-Za-z, and others
+ // others
if (name.empty())
name = to_utf8(text_);
case Qt::Key_ssharp: return "ssharp";
case Qt::Key_ydiaeresis: return "ydiaeresis";
+ case Qt::Key_A: return "A";
+ case Qt::Key_B: return "B";
+ case Qt::Key_C: return "C";
+ case Qt::Key_D: return "D";
+ case Qt::Key_E: return "E";
+ case Qt::Key_F: return "F";
+ case Qt::Key_G: return "G";
+ case Qt::Key_H: return "H";
+ case Qt::Key_I: return "I";
+ case Qt::Key_J: return "J";
+ case Qt::Key_K: return "K";
+ case Qt::Key_L: return "L";
+ case Qt::Key_M: return "M";
+ case Qt::Key_N: return "N";
+ case Qt::Key_O: return "O";
+ case Qt::Key_P: return "P";
+ case Qt::Key_Q: return "Q";
+ case Qt::Key_R: return "R";
+ case Qt::Key_S: return "S";
+ case Qt::Key_T: return "T";
+ case Qt::Key_U: return "U";
+ case Qt::Key_V: return "V";
+ case Qt::Key_W: return "W";
+ case Qt::Key_X: return "X";
+ case Qt::Key_Y: return "Y";
+ case Qt::Key_Z: return "Z";
+ case Qt::Key_0: return "0";
+ case Qt::Key_1: return "1";
+ case Qt::Key_2: return "2";
+ case Qt::Key_3: return "3";
+ case Qt::Key_4: return "4";
+ case Qt::Key_5: return "5";
+ case Qt::Key_6: return "6";
+ case Qt::Key_7: return "7";
+ case Qt::Key_8: return "8";
+ case Qt::Key_9: return "9";
+
// FIXME: these ones I don't know the names of ... help !
// what's here is basically guesses ...
case Qt::Key_Super_L: return "Super_L";