Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolved Print shortcut collision with ctrl-P emacs binding #187

Merged
1 commit merged into from Oct 26, 2010
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion IPython/frontend/qt/console/console_widget.py
Expand Up @@ -170,7 +170,12 @@ def __init__(self, parent=None, **kw):
# Configure actions.
action = QtGui.QAction('Print', None)
action.setEnabled(True)
action.setShortcut(QtGui.QKeySequence.Print)
printkey = QtGui.QKeySequence(QtGui.QKeySequence.Print)
if printkey.matches("Ctrl+P") and sys.platform != 'darwin':
# only override if there is a collision
# Qt ctrl = cmd on OSX, so the match gets a false positive on darwin
printkey = "Ctrl+Shift+P"
action.setShortcut(printkey)
action.triggered.connect(self.print_)
self.addAction(action)
self._print_action = action
Expand Down