qt, android: Add GUIUtil::IsEscapeOrBack helper

This commit is contained in:
Hennadii Stepanov committed 2021-12-03 01:03:30 +02:00
1 parent 0b30bdd519
commit f045f98717
1 file changed
+9
+9
View File
@@ -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