From a9e19fa6bfcddb0a7012eb63686ee5217b6bc776 Mon Sep 17 00:00:00 2001 From: Luke Pollard Date: Sat, 22 Aug 2026 20:08:32 -0400 Subject: [PATCH] ui: select the next-keyboard button when cycling to a new keyboard screen The multi-page keyboard entry screens (passphrase, otp name) set no initial selection, so the first time each page was shown the selection fell back to the first character key ('A', '1', ':') - even though every page after the first is only ever reached by clicking the previous page's 'next keyboard' button, and every later visit to a page starts on its 'next' button (which remains selected from when it was clicked to move on). Set the 'next keyboard' button as the initial selection for every page after the first, so pages reached by clicking 'next' consistently start on 'next'. The first page is shown without any 'next' click and keeps its default initial selection (its first character key). --- main/ui/keyboard.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/ui/keyboard.c b/main/ui/keyboard.c index 6d14dfd00..e2f41d835 100644 --- a/main/ui/keyboard.c +++ b/main/ui/keyboard.c @@ -158,6 +158,14 @@ void make_keyboard_entry_activity(keyboard_entry_t* kb_entry, const char* title) for (size_t i = 0; i < kb_entry->num_kbs; ++i) { make_keyboard_screen(&kb_screen_act, title, kb_entry->keyboards[i], has_next_kb_btn, &kb_entry->textbox_nodes[i], kb_entry->blocked_chars); + + // Initially select the 'shift/next kb' button on all kb screens bar the first, + // as these screens are only ever reached by clicking that button, and it remains + // selected whenever the user later returns to the screen - the first kb screen is + // not reached by a button click, so retains the default initial selection. + if (i > 0) { + gui_set_activity_initial_selection(kb_screen_act.next_button); + } gui_chain_activities(&kb_screen_act, &act_info); }