##// END OF EJS Templates
Merge pull request #1318 from ivanov/qt-console-ctrl-d...
Min RK -
r5989:426a9864 merge
parent child Browse files
Show More
@@ -407,13 +407,14 b' The keybindings themselves are:'
407 407 - ``C-l``: clear terminal.
408 408 - ``C-a``: go to beginning of line.
409 409 - ``C-e``: go to end of line.
410 - ``C-u``: kill from cursor to the begining of the line.
410 411 - ``C-k``: kill from cursor to the end of the line.
411 412 - ``C-y``: yank (paste)
412 413 - ``C-p``: previous line (like up arrow)
413 414 - ``C-n``: next line (like down arrow)
414 415 - ``C-f``: forward (like right arrow)
415 416 - ``C-b``: back (like left arrow)
416 - ``C-d``: delete next character.
417 - ``C-d``: delete next character, or exits if input is empty
417 418 - ``M-<``: move to the beginning of the input region.
418 419 - ``M->``: move to the end of the input region.
419 420 - ``M-d``: delete next word.
@@ -144,8 +144,7 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
144 144 QtCore.Qt.Key_A : QtCore.Qt.Key_Home,
145 145 QtCore.Qt.Key_P : QtCore.Qt.Key_Up,
146 146 QtCore.Qt.Key_N : QtCore.Qt.Key_Down,
147 QtCore.Qt.Key_H : QtCore.Qt.Key_Backspace,
148 QtCore.Qt.Key_D : QtCore.Qt.Key_Delete, }
147 QtCore.Qt.Key_H : QtCore.Qt.Key_Backspace, }
149 148 if not sys.platform == 'darwin':
150 149 # On OS X, Ctrl-E already does the right thing, whereas End moves the
151 150 # cursor to the bottom of the buffer.
@@ -1116,6 +1115,16 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
1116 1115 self._kill_ring.kill_cursor(cursor)
1117 1116 intercepted = True
1118 1117
1118 elif key == QtCore.Qt.Key_D:
1119 if len(self.input_buffer) == 0:
1120 self.exit_requested.emit(self)
1121 else:
1122 new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
1123 QtCore.Qt.Key_Delete,
1124 QtCore.Qt.NoModifier)
1125 QtGui.qApp.sendEvent(self._control, new_event)
1126 intercepted = True
1127
1119 1128 #------ Alt modifier ---------------------------------------------------
1120 1129
1121 1130 elif alt_down:
@@ -188,6 +188,8 b' class MainWindow(QtGui.QMainWindow):'
188 188 justthis.setShortcut('N')
189 189 closeall = QtGui.QPushButton("&Yes, close all", self)
190 190 closeall.setShortcut('Y')
191 # allow ctrl-d ctrl-d exit, like in terminal
192 closeall.setShortcut('Ctrl+D')
191 193 box = QtGui.QMessageBox(QtGui.QMessageBox.Question,
192 194 title, msg)
193 195 box.setInformativeText(info)
General Comments 0
You need to be logged in to leave comments. Login now