Hi,

Following an earlier discussion of how to change the modifier key bindings for Mac OS X, Chris Menzel asked me to post the changes I made to build a "fixed" version of 1.3.4:

Can you make your changes to Qt available so that Mac folks like me
don't have to ask you to recompile LyX every time a new version becomes
available? :-) I'd like to compile 1.3.5, but definitely need to avoid
that nasty, non-emacsy Ctrl->Cmd key mapping.

The patch needed for Qt 3.3.3 / LyX 1.3.5 is actually the same as the one I posted in September, but I'm reposting it at the end of this note for convenience. To build 1.3.5, I downloaded the source distribution from ftp.lyx.org and followed the instructions in README.MacOSX, using Qt 3.3.3 and the configuration flags "to make a build that works with both 10.2 and 10.3." The only thing I did differently was to apply a patch file before compiling Qt.


To create the patch file, cut and paste the text at the end of this note into a plain text file; call it anything and put it anywhere you like. (You can even paste the whole note--the patch program is very forgiving.) Then, from the top of the Qt source hierarchy, issue the command:

patch -p0 < YOUR-PATCH-FILE

where YOUR-PATCH-FILE is of course the path to the patch file you created. Patch should respond with:

patching file src/kernel/qapplication_mac.cpp
Hunk #1 succeeded at 1225 (offset 281 lines).

That's it--the rest of the build should work as advertised.

(And now that you know how to fish, I shouldn't mention that I've posted a new binary at http://www.eecs.harvard.edu/~jason/temp/lyx-1.3.5_macos-aqua-emacs.dmg, but there it is :-)

Please let me know if you encounter any difficulties.

regards,

        -j

Jason Woodard
[EMAIL PROTECTED]



--- 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)



Reply via email to