Add Ctrl+C shortcut to delete line in debug console.
This commit is contained in:
parent
d1fdd5e776
commit
f421b7174f
@ -131,13 +131,16 @@ class ConsoleLineEdit(misc.CommandLineEdit):
|
||||
return text[len(self._curprompt()):]
|
||||
|
||||
def keyPressEvent(self, e):
|
||||
"""Override keyPressEvent to handle up/down keypresses."""
|
||||
"""Override keyPressEvent to handle special keypresses."""
|
||||
if e.key() == Qt.Key_Up:
|
||||
self.history_prev()
|
||||
e.accept()
|
||||
elif e.key() == Qt.Key_Down:
|
||||
self.history_next()
|
||||
e.accept()
|
||||
elif e.modifiers() & Qt.ControlModifier and e.key() == Qt.Key_C:
|
||||
self.setText('')
|
||||
e.accept()
|
||||
else:
|
||||
super().keyPressEvent(e)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user