Fix: Swap A/B buttons logic for TTGO T-Display & T-Display S3
What changed, and why it matters
This commit fixes the assignment of physical A and B buttons on two specific TTGO hardware boards used with the Jade crypto wallet. Previously, the button pins were swapped or set to invalid values, which could cause button presses to be misread or ignored. The fix corrects the pin mapping so the right physical button registers as the right logical action. There is no direct evidence in the commit that this is a security vulnerability, but in a hardware wallet, confusing or ignoring button confirmations could theoretically affect user confirmations of sensitive actions.
Treat as a functional bug fix rather than a security patch unless additional context shows that the swapped buttons could be exploited to bypass transaction confirmation. Users of TTGO T-Display and T-Display S3 boards should update to ensure buttons behave as expected. No immediate security response is indicated by the commit alone.
Security signals we found
Hardware wallet user-input pin mapping changed
Commit title frames change as a fix for swapped button logic
Potential for user confirmation actions to be triggered by the wrong physical button or not triggered at all
Evidence from the diff
The change updates Kconfig defaults for INPUT_BTN_A and INPUT_BTN_B on BOARD_TYPE_TTGO_TDISPLAY and BOARD_TYPE_TTGO_TDISPLAYS3. Before the patch, TTGO T-Display and T-Display S3 used pin 0 (no button) for BTN_A and pins 35/14 for BTN_B, while BTN_B for those boards was set to 0. After the patch, BTN_A is mapped to GPIO 35 (TTGO T-Display) and GPIO 14 (TTGO T-Display S3), and BTN_B is mapped to GPIO 0 for both. This appears to swap the A/B button logic to match the actual hardware layout. The commit title says ‘Fix: Swap A/B buttons logic’ but the diff actually assigns real GPIOs to BTN_A and moves both boards to GPIO 0 for BTN_B, which may reflect a single-button or swapped configuration on these boards.
Changed components
main/Kconfig.projbuildBOARD_TYPE_TTGO_TDISPLAYBOARD_TYPE_TTGO_TDISPLAYS3INPUT_BTN_AINPUT_BTN_BInspect captured patch +4 / −3
diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild
index d360caf..89bac38 100644
--- a/main/Kconfig.projbuild
+++ b/main/Kconfig.projbuild
@@ -241,15 +241,16 @@ menu "Blockstream Jade"
default 37 if BOARD_TYPE_JADE_V1_1
default 38 if BOARD_TYPE_JADE_V2
default 39 if BOARD_TYPE_M5_FIRE || BOARD_TYPE_M5_BLACK_GRAY || BOARD_TYPE_M5_STICKC_PLUS || BOARD_TYPE_M5_STICKC_PLUS_2
- default 0 if BOARD_TYPE_TTGO_TDISPLAY || BOARD_TYPE_TTGO_TDISPLAYS3
+ default 35 if BOARD_TYPE_TTGO_TDISPLAY
+ default 14 if BOARD_TYPE_TTGO_TDISPLAYS3
default 12 if BOARD_TYPE_TTGO_TDISPLAYS3PROCAMERA
default -1
config INPUT_BTN_B
int "BTN B"
default 39 if BOARD_TYPE_JADE_V1_1 || BOARD_TYPE_JADE_V2
default 37 if BOARD_TYPE_M5_FIRE || BOARD_TYPE_M5_BLACK_GRAY || BOARD_TYPE_M5_STICKC_PLUS
- default 35 if BOARD_TYPE_TTGO_TDISPLAY || BOARD_TYPE_M5_STICKC_PLUS_2
- default 14 if BOARD_TYPE_TTGO_TDISPLAYS3
+ default 35 if BOARD_TYPE_M5_STICKC_PLUS_2
+ default 0 if BOARD_TYPE_TTGO_TDISPLAY || BOARD_TYPE_TTGO_TDISPLAYS3
default 16 if BOARD_TYPE_TTGO_TDISPLAYS3PROCAMERA
default -1
config INPUT_WHEEL_SW
Why this scored 31/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.