From 7673e7948454401f7e7c1130d39dcc8c84e7a9db Mon Sep 17 00:00:00 2001 From: Silent YANG Date: Fri, 19 Jan 2024 06:02:25 -0800 Subject: [PATCH] =?UTF-8?q?=E9=94=AE=E7=9B=98=E9=94=81=E5=AE=9A=E4=B8=8B?= =?UTF-8?q?=E9=94=81=E5=AE=9AM=E9=94=AE=E9=95=BF=E6=8C=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/app.c b/app/app.c index 2ea3b5f..402f167 100644 --- a/app/app.c +++ b/app/app.c @@ -1694,13 +1694,13 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) // KEY_MENU has a special treatment here, because we want to pass hold event to ACTION_Handle // but we don't want it to complain when initial press happens // we want to react on realese instead +#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && // pass side buttons - !(Key == KEY_MENU && bKeyHeld)) // pass KEY_MENU held + !(Key == KEY_MENU && bKeyHeld && gEeprom.KEY_M_LONG_PRESS_ACTION == ACTION_OPT_KEYLOCK)) // pass KEY_MENU held +#else + else if (Key != KEY_SIDE1 && Key != KEY_SIDE2) // pass KEY_MENU held +#endif { - if ((!bKeyPressed || bKeyHeld || (Key == KEY_MENU && bKeyPressed)) && // prevent released or held, prevent KEY_MENU pressed - !(Key == KEY_MENU && !bKeyPressed)) // pass KEY_MENU released - return; - // keypad is locked, tell the user AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL); gKeypadLocked = 4; // 2 seconds