Skip to content

Commit 3db405b

Browse files
committed
qt: add Ctrl+Shift+L to clear console and history; clear input only when Shift is held
1 parent 0060429 commit 3db405b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/qt/rpcconsole.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
506506
ui->openDebugLogfileButton->setIcon(platformStyle->SingleColorIcon(":/icons/export"));
507507
}
508508
ui->clearButton->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
509+
//: Secondary shortcut to clear both console output and input history
510+
GUIUtil::AddButtonShortcut(ui->clearButton, tr("Ctrl+Shift+L"));
509511

510512
ui->fontBiggerButton->setIcon(platformStyle->SingleColorIcon(":/icons/fontbigger"));
511513
//: Main shortcut to increase the RPC console font size.
@@ -825,6 +827,8 @@ void RPCConsole::setFontSize(int newSize)
825827

826828
void RPCConsole::clear(bool keep_prompt)
827829
{
830+
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
831+
history.clear();
828832
ui->messagesWidget->clear();
829833
if (!keep_prompt) ui->lineEdit->clear();
830834
ui->lineEdit->setFocus();

0 commit comments

Comments
 (0)