On Sep 15, 2004, at 10:47 PM, Chris Menzel wrote:
Just to register the fact -- I would echo this complaint. I still use emacs extensively, and it is very awkward to switch to LyX and use Cmd. Using uControl to map CapsLock to Cmd helps quite a lot, though...
I'm happy to report that thanks to Jean-Marc's pointer, I was able to build a modified version of LyX/Mac 1.3.4 that should be more comfortable for Emacs users.
I rebuilt Qt/Mac and LyX/Mac according to Ronald Florence's instructions (README.MacOSX) in the LyX distribution. (Had a small problem patching qglobal.cpp, but easy to work around by hand.) The following patch can be applied before or after his qt.patch file:
--- src/kernel/qapplication_mac.cpp.orig Thu Jun 19 01:35:24 2003
+++ src/kernel/qapplication_mac.cpp Wed Sep 15 14:39:45 2004
@@ -944,11 +944,11 @@
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) },
+{ controlKey, MAP_KEY(Qt::ControlButton) },
+{ rightControlKey, MAP_KEY(Qt::ControlButton) },
+{ cmdKey, MAP_KEY(Qt::AltButton) },
+// { optionKey, MAP_KEY(Qt::AltButton) },
+// { rightOptionKey, MAP_KEY(Qt::AltButton) },
{ kEventKeyModifierNumLockMask, MAP_KEY(Qt::Keypad) },
{ 0, MAP_KEY(0) } };
static int get_modifiers(int key, bool from_mouse=FALSE)Note that Qt's AltButton actually maps to LyX's meta key, for reasons I don't fully understand. When combined with my usual setting for uControl (convert caps lock to control), the end result is that the physical caps lock and control keys map to LyX's control key ("C-"), the command key maps to LyX's meta key ("M-"), and the option (a.k.a. alt) key does what it used to do, namely generate certain accented characters; unfortunately Qt doesn't seem to support composed key sequences.
I've posted the modified binary at http://www.eecs.harvard.edu/~jason/temp/lyx-1.3.4_macos-aqua-emacs.dmg. I don't guarantee it will stay there--would prefer to see a better solution make its way into the main distribution. Please let me know if you have any problems with it, though. (You may need to run Edit -> Reconfigure after installing the new LyX.app in your Applications directory.)
regards,
-j
Jason Woodard [EMAIL PROTECTED]
