SFT-5988: swapped pink and blue, added 5 enter key press to leave keypad test
What changed, and why it matters
This commit changes the colors used in a factory-style keypad test screen and adds a new way to exit the test by pressing the Enter key five times. There is no security-relevant change visible in the diff.
No security action needed. Treat as a normal functional/UI commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies ports/stm32/boards/Passport/modules/views/keypad.py. It swaps the background colors assigned to odd/even release counts in the keypad test UI (LIGHT_PINK and LIGHT_BLUE) and changes the exit condition for the keypad test from ‘all keys were pressed once’ to ‘all keys were pressed once AND the Enter/Y key was released at least five times’. This is a UI/UX tweak for a diagnostic or manufacturing test mode.
Changed components
ports/stm32/boards/Passport/modules/views/keypad.pyInspect captured patch +4 / −3
diff --git a/ports/stm32/boards/Passport/modules/views/keypad.py b/ports/stm32/boards/Passport/modules/views/keypad.py
index d07ca82..95553af 100644
--- a/ports/stm32/boards/Passport/modules/views/keypad.py
+++ b/ports/stm32/boards/Passport/modules/views/keypad.py
@@ -142,9 +142,9 @@ class Keypad(View):
if released_count == 0:
style.bg_color(VERY_LIGHT_GREY)
elif released_count % 2 == 1: # odd
- style.bg_color(LIGHT_PINK)
- else: # even and > 0
style.bg_color(LIGHT_BLUE)
+ else: # even and > 0
+ style.bg_color(LIGHT_PINK)
key_label = key_state.get('label')
if key_label is not None:
@@ -162,7 +162,8 @@ class Keypad(View):
if self.key_state[key]['released'] == 0:
all_were_pressed = False
- return all_were_pressed
+ # Allow pressing all multiple times, exit by pressing the enter key 5 times
+ return all_were_pressed and self.key_state['y']['released'] >= 5
def on_key(self, key, pressed):
if key in self.key_state:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.