Skip to content
Browse files

WIP on ctrl-d to exit pdb

  • Loading branch information...
1 parent 7415e59 commit df94238d78de306b629af6f36471522cfba74e45 @ivanov committed Jun 23, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 IPython/frontend/qt/console/console_widget.py
View
11 IPython/frontend/qt/console/console_widget.py
@@ -1168,13 +1168,16 @@ def _event_filter_console_keypress(self, event):
intercepted = True
elif key == QtCore.Qt.Key_D:
+ print "Ctrl-D pressed:" + self.input_buffer
if len(self.input_buffer) == 0:
self.exit_requested.emit(self)
else:
- new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
- QtCore.Qt.Key_Delete,
- QtCore.Qt.NoModifier)
- QtGui.qApp.sendEvent(self._control, new_event)
+ # this is what we want to do to exit out of PDB
+ self._append_plain_text('EOF\n')
+ #new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
+ # QtCore.Qt.Key_Delete,
+ # QtCore.Qt.NoModifier)
+ #QtGui.qApp.sendEvent(self._control, new_event)
intercepted = True
#------ Alt modifier ---------------------------------------------------

0 comments on commit df94238

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