Guillaume Marcais <[EMAIL PROTECTED]> wrote: > On MacOSX, the Control modifier has been mapped to the "Apple key", and > the Meta modifier to the "Alt key". I guess this is nice for old MacOS > timers.
No, it isn't!! :-) > But I am using the emacs binding and the fact that the control or > escape changed place on the keyboard makes it almost a new set of > binding to learn... > So the question, is there a way on the MacOSX platform to have the > Control and Meta modifier back to their traditional UNIX location, > i.e. the ctrl and esc keys? The problem with Ctrl lies with Qt, but lucky for us, Jason Woodard was savvy enough to write a patch for Qt 3.3.3 to fix this, and posted it in the msg below. There is also a link to an OS X LyX 1.3.5 binary if you don't want to compile it yourself. Note this does not give you Esc for Meta; that role is given to the Cmd key (as with X11 emacs under OS X). IMO, this is far superior, as it requires less of a stretch and, more important, gives you a "persistent" Meta key that works like Ctrl; no need to bang on the Esc key repeatedly to, e.g., move the cursor by word. Chris Menzel ----- Forwarded message from Jason Woodard <[EMAIL PROTECTED]> ----- From: Jason Woodard <[EMAIL PROTECTED]> Subject: Qt mods: LyX/Mac modifier keys Date: Mon, 22 Nov 2004 12:19:46 +0800 To: LyX-Users <[email protected]> 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) ----- End forwarded message -----
