1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Android: Fix back button sometimes not working as ESC (#14743)

This commit is contained in:
grorp 2024-06-11 22:37:57 +02:00 committed by GitHub
parent ae4cd1ebf1
commit 85878d894a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 7 additions and 13 deletions

View file

@ -4105,7 +4105,7 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
// Fix Esc/Return key being eaten by checkboxen and tables
if (event.EventType == EET_KEY_INPUT_EVENT) {
KeyPress kp(event.KeyInput);
if (kp == EscapeKey || kp == CancelKey
if (kp == EscapeKey
|| kp == getKeySetting("keymap_inventory")
|| event.KeyInput.Key==KEY_RETURN) {
gui::IGUIElement *focused = Environment->getFocus();
@ -4173,7 +4173,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
if (event.EventType==EET_KEY_INPUT_EVENT) {
KeyPress kp(event.KeyInput);
if (event.KeyInput.PressedDown && (
(kp == EscapeKey) || (kp == CancelKey) ||
(kp == EscapeKey) ||
((m_client != NULL) && (kp == getKeySetting("keymap_inventory"))))) {
tryClose();
return true;