[Concept,21/22] expo: Consider an item selected when a password is entered

Message ID 20251207201628.2882382-22-sjg@u-boot.org
State New
Headers
Series expo: Expand docs, dump and textlines in non-popup expos |

Commit Message

Simon Glass Dec. 7, 2025, 8:16 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

When the user types in an unlock password then presses 'enter', select
the item containing the password. This avoids needing to click on an
item as well.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/bootflow_menu.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c
index ee3150afef4..01af30c6627 100644
--- a/boot/bootflow_menu.c
+++ b/boot/bootflow_menu.c
@@ -457,6 +457,13 @@  int bootflow_menu_poll(struct expo *exp, int *seqp)
 	}
 	case EXPOACT_QUIT:
 		return -EPIPE;
+	case EXPOACT_CLOSE:
+		/*
+		 * Password textline closed (Enter pressed) - treat as
+		 * selection
+		 */
+		*seqp = act.select.id - ITEM_PASS;
+		break;
 	case EXPOACT_CLICK:
 		if (act.select.id == OBJ_SETTINGS)
 			return -ECOMM;  /* layout change request */