diff -Nurd -x'*~' lyx-1.6.7-orig/src/LyXRC.cpp lyx-1.6.7/src/LyXRC.cpp
--- lyx-1.6.7-orig/src/LyXRC.cpp 2010-05-30 09:29:11.000000000 -0700
+++ lyx-1.6.7/src/LyXRC.cpp 2010-09-06 14:35:24.000000000 -0700
@@ -115,6 +115,7 @@
{ "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
{ "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
{ "\\load_session", LyXRC::RC_LOADSESSION },
+ { "\\mac_dontswap_ctrl_meta", LyXRC::RC_MAC_DONTSWAP_CTRL_META },
{ "\\mac_like_word_movement", LyXRC::RC_MAC_LIKE_WORD_MOVEMENT },
{ "\\macro_edit_style", LyXRC::RC_MACRO_EDIT_STYLE },
{ "\\make_backup", LyXRC::RC_MAKE_BACKUP },
@@ -205,6 +206,7 @@
void LyXRC::setDefaults()
{
+ mac_dontswap_ctrl_meta = false;
bind_file = "cua";
def_file = "default";
ui_file = "default";
@@ -831,6 +833,10 @@
lexrc >> paragraph_markers;
break;
+ case RC_MAC_DONTSWAP_CTRL_META:
+ lexrc >> mac_dontswap_ctrl_meta;
+ break;
+
case RC_MAC_LIKE_WORD_MOVEMENT:
lexrc >> mac_like_word_movement;
break;
@@ -1571,6 +1577,15 @@
}
if (tag != RC_LAST)
break;
+ case RC_MAC_DONTSWAP_CTRL_META:
+ if (ignore_system_lyxrc ||
+ mac_dontswap_ctrl_meta
+ != system_lyxrc.mac_dontswap_ctrl_meta) {
+ os << "\\mac_dontswap_ctrl_meta "
+ << convert<string>(mac_dontswap_ctrl_meta) << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
case RC_MAC_LIKE_WORD_MOVEMENT:
if (ignore_system_lyxrc ||
mac_like_word_movement
@@ -2579,6 +2594,10 @@
str = _("LyX normally doesn't update the cursor position if you move the scrollbar. Set to true if you'd prefer to always have the cursor on screen.");
break;
+ case RC_MAC_DONTSWAP_CTRL_META:
+ str = _("Make Apple key act as Meta and Control key as Ctrl.");
+ break;
+
case RC_MAC_LIKE_WORD_MOVEMENT:
str = _("Use the Mac OS X conventions for the word-level cursor movement");
break;
diff -Nurd -x'*~' lyx-1.6.7-orig/src/LyXRC.h lyx-1.6.7/src/LyXRC.h
--- lyx-1.6.7-orig/src/LyXRC.h 2010-05-30 09:29:11.000000000 -0700
+++ lyx-1.6.7/src/LyXRC.h 2010-09-06 14:35:24.000000000 -0700
@@ -62,6 +62,7 @@
RC_CONVERTER_CACHE_MAXAGE,
RC_COPIER,
RC_CURSOR_FOLLOWS_SCROLLBAR,
+ RC_MAC_DONTSWAP_CTRL_META,
RC_MAC_LIKE_WORD_MOVEMENT,
RC_CUSTOM_EXPORT_COMMAND,
RC_CUSTOM_EXPORT_FORMAT,
@@ -380,6 +381,8 @@
///
std::string gui_language;
///
+ bool mac_dontswap_ctrl_meta;
+ ///
bool mac_like_word_movement;
///
bool cursor_follows_scrollbar;
Binary files lyx-1.6.7-orig/src/frontends/qt4/.DS_Store and lyx-1.6.7/src/frontends/qt4/.DS_Store differ
diff -Nurd -x'*~' lyx-1.6.7-orig/src/frontends/qt4/GuiApplication.cpp lyx-1.6.7/src/frontends/qt4/GuiApplication.cpp
--- lyx-1.6.7-orig/src/frontends/qt4/GuiApplication.cpp 2010-01-23 01:56:39.000000000 -0800
+++ lyx-1.6.7/src/frontends/qt4/GuiApplication.cpp 2010-09-06 14:35:24.000000000 -0700
@@ -1146,6 +1146,9 @@
return;
#ifdef Q_WS_MACX
+#if QT_VERSION > 0x040600
+ setAttribute(Qt::AA_MacDontSwapCtrlAndMeta,lyxrc.mac_dontswap_ctrl_meta);
+#endif
// Create the global default menubar which is shown for the dialogs
// and if no GuiView is visible.
// This must be done after the session was recovered to know the "last files".
diff -Nurd -x'*~' lyx-1.6.7-orig/src/frontends/qt4/GuiPrefs.cpp lyx-1.6.7/src/frontends/qt4/GuiPrefs.cpp
--- lyx-1.6.7-orig/src/frontends/qt4/GuiPrefs.cpp 2010-05-30 09:29:11.000000000 -0700
+++ lyx-1.6.7/src/frontends/qt4/GuiPrefs.cpp 2010-09-06 14:35:24.000000000 -0700
@@ -468,6 +468,12 @@
this, SIGNAL(changed()));
connect(mouseWheelSpeedSB, SIGNAL(valueChanged(double)),
this, SIGNAL(changed()));
+#ifdef Q_WS_MACX
+#if QT_VERSION > 0x040600
+ connect(dontswapCB, SIGNAL(toggled(bool)),
+ this, SIGNAL(changed()));
+#endif
+#endif
}
@@ -478,6 +484,11 @@
rc.primary_kbmap = internal_path(fromqstr(firstKeymapED->text()));
rc.secondary_kbmap = internal_path(fromqstr(secondKeymapED->text()));
rc.mouse_wheel_speed = mouseWheelSpeedSB->value();
+#ifdef Q_WS_MACX
+#if QT_VERSION > 0x040600
+ rc.mac_dontswap_ctrl_meta = dontswapCB->isChecked();
+#endif
+#endif
}
@@ -488,6 +499,11 @@
firstKeymapED->setText(toqstr(external_path(rc.primary_kbmap)));
secondKeymapED->setText(toqstr(external_path(rc.secondary_kbmap)));
mouseWheelSpeedSB->setValue(rc.mouse_wheel_speed);
+#ifdef Q_WS_MACX
+#if QT_VERSION > 0x040600
+ dontswapCB->setChecked(rc.mac_dontswap_ctrl_meta);
+#endif
+#endif
}
diff -Nurd -x'*~' lyx-1.6.7-orig/src/frontends/qt4/ui/PrefInputUi.ui lyx-1.6.7/src/frontends/qt4/ui/PrefInputUi.ui
--- lyx-1.6.7-orig/src/frontends/qt4/ui/PrefInputUi.ui 2009-04-01 14:25:06.000000000 -0700
+++ lyx-1.6.7/src/frontends/qt4/ui/PrefInputUi.ui 2010-09-06 14:35:25.000000000 -0700
@@ -113,6 +113,16 @@
</property>
</widget>
</item>
+ <item row="3" column="0" colspan="3" >
+ <widget class="QCheckBox" name="dontswapCB" >
+ <property name="text" >
+ <string>Do not swap Meta and Control keys</string>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>