^ Event is now solved for Lyx-QT/Aqua. A patch is attached!
-Jan
1. in the QT/ X11 version, we could use the hotkey ^ which doeswork in Aqua anymore.not
It probably should, however such a key is a bit dependent upon what input you are using. Where do you have it as a hotkey? Can you send a small example?
Apparently, QT/Aqua is returning a different symbol code instead of ~S and asciicircum in Aqua then in X11 (on the same computer). I could not figure out which one though, as I am just a "bugfinder" in the Aquaporting.
If you want to try the error: just start LyX, enter APPLEKEY+m for math mode, and then SHIFT+^ . It will print an ^ because Qt::Key_AsciiCircum appears not to be called.
How is this accelerator created? I stuck one into a QMenuBar with no luck in causing a problem. Are you using a QAccel? Are you just watching key events?
The main difference is the return keyboard code for ^. It differs by
Lyx/Aqua Output: Setting key to 65535, ^ Lyx/X11 Output: Setting key to 94, ^
where function
string const fromqstr(QString const & str) { QTextCodec * codec = QTextCodec::codecForLocale(); QCString tmpstr = codec->fromUnicode(str); char const * tmpcstr = tmpstr; return tmpcstr; }
returns these results. It is called in
void QLyXKeySym::set(QKeyEvent * ev) { key_ = ev->key(); //... text_ = ev->text(); cerr << "Setting key to " << key_ << ", " << fromqstr(text_) << endl; }
Any ideas on this one?
Yep, looks like a bug indeed. QAccel can handle this, however as it so happens this key was not mapped in the QKeyEvent :) I have attached a patch to fix this.
Thanks for narrowing it down, helped quite a bit to see you were using a
QKeyEvent directly.
patch.diff
Description: Binary data
