Skip to content

Commit fe035a5

Browse files
committed
qt: Handle Android back key in the Node window
1 parent 4633199 commit fe035a5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/qt/rpcconsole.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,14 @@ void RPCConsole::clear(bool keep_prompt)
910910

911911
void RPCConsole::keyPressEvent(QKeyEvent *event)
912912
{
913-
if(windowType() != Qt::Widget && event->key() == Qt::Key_Escape)
914-
{
913+
const auto close_key =
914+
#ifdef Q_OS_ANDROID
915+
Qt::Key_Back;
916+
#else
917+
Qt::Key_Escape;
918+
#endif // Q_OS_ANDROID
919+
920+
if (windowType() != Qt::Widget && event->key() == close_key) {
915921
close();
916922
}
917923
}

0 commit comments

Comments
 (0)