diff options
-rw-r--r-- | src/qt/guiutil.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 211f3f506d..364962ee9a 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -428,6 +428,15 @@ namespace GUIUtil */ void ShowModalDialogAndDeleteOnClose(QDialog* dialog); + inline bool IsEscapeOrBack(int key) + { + if (key == Qt::Key_Escape) return true; +#ifdef Q_OS_ANDROID + if (key == Qt::Key_Back) return true; +#endif // Q_OS_ANDROID + return false; + } + } // namespace GUIUtil #endif // BITCOIN_QT_GUIUTIL_H |