I had high hopes that the fact that I used native Qt menu shortcuts in
menus would make LyX/Mac magically display the shortcuts, but it turns
out that I have been overoptimistic.

Currently the shortcuts do not appear, and it seems to be due to the
following explanation from qkeysequence.cpp:

/*!
    Creates an accelerator string for the key sequence.
    For instance CTRL+Key_O gives "Ctrl+O". If the key sequence has
    multiple key codes they are returned comma-separated, e.g.
    "Alt+X, Ctrl+Y, Z". The strings, "Ctrl", "Shift", etc. are
    translated (using QObject::tr()) in the "QAccel" scope. If the key
    sequence has no keys, QString::null is returned.

    On Mac OS X, the string returned resembles the sequence that is shown in
    the menubar.
*/
QKeySequence::operator QString() const

The important part is the last paragraph. The shortcut string is
encoded in unicode in Qt/Mac, and we loose that when going through
std::string. 

I think that everything would be working smoothly if we did not try to
use QKeySequence instead of the text representation of bindings, but a
smoother way would be to keep the unicode representation intact in the
frontend. 

Ideas, anyone?

JMarc

Reply via email to