Skip to content
Browse files

Merge pull request #776 from Carreau/reworking-qtconsole-shortcut

Reworking qtconsole shortcut, add fullscreen
  • Loading branch information...
2 parents 57adf06 + 677c8ce commit 08bae629189fb21f5a4d8a7526f38a8ec7a001ac @epatters epatters committed Sep 15, 2011
Showing with 15 additions and 1 deletion.
  1. +1 −0 IPython/core/usage.py
  2. +14 −1 IPython/frontend/qt/console/qtconsoleapp.py
View
1 IPython/core/usage.py
@@ -416,6 +416,7 @@
- ``C-.``: force a kernel restart (a confirmation dialog appears).
- ``C-+``: increase font size.
- ``C--``: decrease font size.
+- ``C-M-Space``: toggle full screen. (Command-Control-Space on Mac OS X)
The IPython pager
=================
View
15 IPython/frontend/qt/console/qtconsoleapp.py
@@ -98,7 +98,7 @@ def __init__(self, app, frontend, existing=False, may_close=True,
self._frontend.exit_requested.connect(self.close)
self._confirm_exit = confirm_exit
self.setCentralWidget(frontend)
-
+
#---------------------------------------------------------------------------
# QWidget interface
#---------------------------------------------------------------------------
@@ -461,6 +461,19 @@ def initialize(self, argv=None):
self.init_kernel_manager()
self.init_qt_elements()
self.init_colors()
+ self.init_window_shortcut()
+
+ def init_window_shortcut(self):
+ fullScreenAction = QtGui.QAction('Toggle Full Screen', self.window)
+ fullScreenAction.setShortcut('Ctrl+Meta+Space')
+ fullScreenAction.triggered.connect(self.toggleFullScreen)
+ self.window.addAction(fullScreenAction)
+
+ def toggleFullScreen(self):
+ if not self.window.isFullScreen():
+ self.window.showFullScreen()
+ else:
+ self.window.showNormal()
def start(self):

0 comments on commit 08bae62

Please sign in to comment.
Something went wrong with that request. Please try again.