Skip to content
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

fix(bw): ignore short/long press of ENTER if cursor on menu line #5404

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Aug 8, 2024

Fixes #5398

@philmoz philmoz added color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour B&W Related generally to black and white LCD radios labels Aug 8, 2024
@philmoz philmoz added this to the 2.11 milestone Aug 8, 2024
@pfeerick pfeerick modified the milestones: 2.11, 2.10.x Aug 8, 2024
@pfeerick pfeerick changed the title fix(bw): ignore long press of ENTER if cursor on menu line. fix(bw): ignore long press of ENTER if cursor on menu line Aug 8, 2024
@pfeerick pfeerick added bug 🪲 Something isn't working and removed color Related generally to color LCD radios labels Aug 8, 2024
@pfeerick
Copy link
Member

pfeerick commented Aug 8, 2024

LGTM. Does this look right for blocking normal press of ENT also? As that looks to trigger copy mode when in the top row 😖 ... i.e. IMO it should only be the cursor keys (left/right/up/down) + RTN responded to on the menu line with 9X. With this, the TLite seems good now (tested on 2.10).

diff --git a/radio/src/gui/common/stdlcd/model_inputs.cpp b/radio/src/gui/common/stdlcd/model_inputs.cpp
index a35e63eb5..af1621cb8 100644
--- a/radio/src/gui/common/stdlcd/model_inputs.cpp
+++ b/radio/src/gui/common/stdlcd/model_inputs.cpp
@@ -288,7 +288,7 @@ void menuModelExposAll(event_t event)
       }
       break;
     case EVT_KEY_BREAK(KEY_ENTER):
-      if ((!s_currCh || (s_copyMode && !s_copyTgtOfs))) {
+      if (sub >= 0 && (!s_currCh || (s_copyMode && !s_copyTgtOfs))) {
         s_copyMode = (s_copyMode == COPY_MODE ? MOVE_MODE : COPY_MODE);
         s_copySrcIdx = s_currIdx;
         s_copySrcCh = chn;
diff --git a/radio/src/gui/common/stdlcd/model_mixes.cpp b/radio/src/gui/common/stdlcd/model_mixes.cpp
index 2d3bff401..d07a90f77 100644
--- a/radio/src/gui/common/stdlcd/model_mixes.cpp
+++ b/radio/src/gui/common/stdlcd/model_mixes.cpp
@@ -204,7 +204,7 @@ void menuModelMixAll(event_t event)
       }
       break;
     case EVT_KEY_BREAK(KEY_ENTER):
-      if ((!s_currCh || (s_copyMode && !s_copyTgtOfs))) {
+      if (sub >= 0 && (!s_currCh || (s_copyMode && !s_copyTgtOfs))) {
         s_copyMode = (s_copyMode == COPY_MODE ? MOVE_MODE : COPY_MODE);
         s_copySrcIdx = s_currIdx;
         s_copySrcCh = chn;

@philmoz
Copy link
Collaborator Author

philmoz commented Aug 8, 2024

Yes, that change looks good. Will you update PR?

@pfeerick
Copy link
Member

pfeerick commented Aug 9, 2024

Yes, will push now.

@pfeerick pfeerick changed the title fix(bw): ignore long press of ENTER if cursor on menu line fix(bw): ignore short/long press of ENTER if cursor on menu line Aug 9, 2024
@pfeerick pfeerick merged commit eea9b85 into main Aug 9, 2024
47 checks passed
@pfeerick pfeerick deleted the philmoz/9x-nav-long-press branch August 9, 2024 00:45
pfeerick added a commit that referenced this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B&W Related generally to black and white LCD radios bug 🪲 Something isn't working UX-UI Related to user experience (UX) or user interface (UI) behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long press ENT on TLite when still in navigation mode
2 participants