From 571f80d8a9cf689516f6d928b0b33e74bf445274 2011-02-10 17:02:39 From: epatters Date: 2011-02-10 17:02:39 Subject: [PATCH] Fixed bug where Cmd-C would clear the selection on Mac OS. --- diff --git a/IPython/frontend/qt/console/console_widget.py b/IPython/frontend/qt/console/console_widget.py index 202a2eb..a6e0cba 100644 --- a/IPython/frontend/qt/console/console_widget.py +++ b/IPython/frontend/qt/console/console_widget.py @@ -1302,9 +1302,9 @@ class ConsoleWidget(Configurable, QtGui.QWidget): intercepted = (not self._in_buffer(anchor) or not self._in_buffer(position)) - # Don't move the cursor if control is down to allow copy-paste using - # the keyboard in any part of the buffer. - if not ctrl_down: + # Don't move the cursor if Control/Cmd is pressed to allow copy-paste + # using the keyboard in any part of the buffer. + if not self._control_key_down(event.modifiers(), include_command=True): self._keep_cursor_in_buffer() return intercepted