>>>>> "Jason" == Jason Woodard <[EMAIL PROTECTED]> writes:

Jason> I realize this may not technically be a LyX problem, but it
Jason> does seem to be a problem for more LyX users than users of
Jason> other Qt/Mac applications; I can't find anything about it on
Jason> the Qt mailing lists. Can anyone explain exactly what would
Jason> need to be fixed in Qt/Mac to resolve it? Any idea whether the
Jason> Qt developers are aware/receptive?

In src/kernel/qapplication_mac.cpp (Qt 3.3.3), there is the following 
array definition:
static key_sym modifier_syms[] = {
{ shiftKey, MAP_KEY(Qt::ShiftButton) },
{ rightShiftKeyBit, MAP_KEY(Qt::ShiftButton) },
{ controlKey, MAP_KEY(Qt::MetaButton) },
{ rightControlKey, MAP_KEY(Qt::MetaButton) },
{ cmdKey, MAP_KEY(Qt::ControlButton) },
{ optionKey, MAP_KEY(Qt::AltButton) },
{ rightOptionKey, MAP_KEY(Qt::AltButton) },
{ kEventKeyModifierNumLockMask, MAP_KEY(Qt::Keypad) },

As you can see, it hardcodes the relation between OSX keys and Qt
equivalents. In particular, the 5th entry maps Command to Control.

This is used unconditionally in the code just below.

So fixing this would mean adding a way to provide a different
translation table.

Actually, there would be a way to work around this: add OSX-specific
code that hooks into the event loop to rewrite the keyboard event with
different modifiers. For example, if the modifier cmdKey is used,
change it to controlKey, so that Qt translates it later to
Qt::MetaButton. This will lead unfortunately to bad shortcuts
displayed in the menus (and it is an ugly hack).

Note also that LyX only uses the Meta, Control and Shift modifiers. We
should maybe investigate whether we want to use the Alt modifier too. 

If you want to complain to trolltech, you should detail what are the
drawbacks of their implementation. AFAIK, one big problem is that the
accented characters accessible usually through the option key cannot
be accessed anymore. 

Other people have complained that the current bindings are not nice
for people using emacs bindings. Is that your case?

Hope this helps.

JMarc

Reply via email to