From 9162e97cacd981bffbda85f338495a5f61226ea0 Mon Sep 17 00:00:00 2001 From: Alezito2008 Date: Sun, 8 Mar 2026 03:08:05 -0300 Subject: [PATCH] fix: disable on-screen button binds in Keyboard PC mode --- .../Common/UI/UIScene_Keyboard.cpp | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp b/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp index b28564c3a..89a7216d2 100644 --- a/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp +++ b/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp @@ -211,23 +211,30 @@ void UIScene_Keyboard::handleInput(int iPad, int key, bool repeat, bool pressed, if(repeat || pressed) { - switch(key) + if (key == ACTION_MENU_CANCEL) { - case ACTION_MENU_CANCEL: #ifdef _WINDOWS64 - { - // Cache before navigateBack() destroys this scene - int(*cb)(LPVOID, const bool) = m_win64Callback; - LPVOID cbParam = m_win64CallbackParam; - navigateBack(); - if (cb) - cb(cbParam, false); - } + // Cache before navigateBack() destroys this scene + int(*cb)(LPVOID, const bool) = m_win64Callback; + LPVOID cbParam = m_win64CallbackParam; + navigateBack(); + if (cb) + cb(cbParam, false); #else navigateBack(); #endif handled = true; - break; + return; + } + + // Don't handle on-screen buttons + if (m_bPCMode) + { + return; + } + + switch(key) + { case ACTION_MENU_X: // X out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcBackspaceButtonPressed, 0 , NULL ); handled = true;