-
Notifications
You must be signed in to change notification settings - Fork 327
qt: Handle Android back key in the Node window #493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @icota |
src/qt/rpcconsole.cpp
Outdated
| if(windowType() != Qt::Widget && event->key() == Qt::Key_Escape) | ||
| { | ||
| const auto close_key = | ||
| #ifdef Q_OS_ANDROID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the #ifdef. Any way to remap this globally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@icota Could you elaborate? I'm not sure about Qt::Key_Back on non-Android platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One point is that this should be done globally rather than just in rpcconsole. In our case Qt::Key_Back and Qt::Key_Escape will always serve the same purpose.
It also should not be an either-or because Android phones can have keyboards hooked up to them and ChromeOS can run APKs as well.
I guess my suggestion would be something like a global macro/function that checks if its escape or back button. If this is truly the only place where we need to check for the back button then if (event->key == Qt::Key_Escape || event->key == Qt::Key_Back) is also cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Implemented.
|
utACK a56a104 |
…indow a56a104 qt: Handle Android back key in the Node window (Hennadii Stepanov) f045f98 qt, android: Add GUIUtil::IsEscapeOrBack helper (Hennadii Stepanov) Pull request description: On master (4633199) there are no means to return from the Node window to the main one on Android. This PR assigns this functionality to the Android back key:  ACKs for top commit: icota: utACK bitcoin-core/gui@a56a104 Tree-SHA512: 379c1ad8c6bffa037e861b88c66eb33872d7f7d54aa2f76289a51c55d79a37a0c16262b20f22d00fda11522c7df1f3561c1ceae34cd7a85da94aee4c6cdcfaaf
…indow 92ebecb qt: Handle Android back key in the Node window (Hennadii Stepanov) 948f896 qt, android: Add GUIUtil::IsEscapeOrBack helper (Hennadii Stepanov) Pull request description: On master (0d88113) there are no means to return from the Node window to the main one on Android. This PR assigns this functionality to the Android back key:  ACKs for top commit: icota: utACK bitcoin-core/gui@92ebecb Tree-SHA512: 379c1ad8c6bffa037e861b88c66eb33872d7f7d54aa2f76289a51c55d79a37a0c16262b20f22d00fda11522c7df1f3561c1ceae34cd7a85da94aee4c6cdcfaaf
On master (4633199) there are no means to return from the Node window to the main one on Android.
This PR assigns this functionality to the Android back key: