On Sep 14, 2004, at 5:42 PM, Jean-Marc Lasgouttes wrote:
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) },
Excellent--I've now grabbed a copy of the Qt source and will play around with it this weekend. I'm hoping I can just swap the controlKey and cmdKey entries (i.e., hard-code it the "right" way), then recompile and relink with LyX. If that works, I'll post a patch and mini-HOWTO for fellow Emacs addicts who want a quick fix and are willing to build from source.
I agree that a better solution would allow the translation table to be changed at runtime, ideally in a way that would be visible to LyX's key binding scheme. Not sure what changes to the Qt APIs this would require (or whether it could be done in a platform-neutral way), but may throw the suggestion to trolltech if/when I get a hacked version working.
thanks for your quick and detailed reply!
-j
