InkHUD: Add full touch support to T5s3#10286
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aca1f0e8dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds touch-first UX to the InkHUD UI stack (targeting the T5-S3 e-paper touchscreen), including direct touch hit-testing for menus/keyboard, tile selection, an app switcher, and T5-S3-specific touch/backlight handling integrated with sleep/power behavior.
Changes:
- Implement coordinate-based touch dispatch through InkHUD (touch tap/long-press + touch navigation events) and add touch-aware UI components (app switcher, touch status indicator, touch menu selection).
- Add T5-S3 variant support for touch enable/disable + backlight behavior (including IO expander side-key handling) and wire it into light/deep sleep + PowerFSM timeouts.
- Improve touchscreen sampling/gesture handling (poll cadence overrides, release “grace” window, and a fast-tap mode for keyboard-heavy flows).
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| variants/esp32s3/t5s3_epaper/variant.h | Adds T5-S3 touch poll cadence overrides and declares touch/backlight helper APIs + PCA9535 side-key defines. |
| variants/esp32s3/t5s3_epaper/variant.cpp | Implements T5-S3 touch/backlight state machine, GT911 home callback gating, and PCA9535 side-key interrupt thread. |
| variants/esp32s3/t5s3_epaper/nicheGraphics.h | Configures InkHUD for T5-S3 touch status provider and button wiring semantics. |
| src/sleep.cpp | Avoids PMIC “hard shutdown” during timed deep sleep; adds PCA9535 INT as light-sleep wake source. |
| src/input/TouchScreenImpl1.h | Adds overrides to control fast-tap mode + long-press enablement. |
| src/input/TouchScreenImpl1.cpp | Enables fast-tap/disable-long-press behavior when InkHUD keyboard is foreground. |
| src/input/TouchScreenBase.h | Adds fast-tap/long-press virtual hooks and a release-glitch suppression timestamp. |
| src/input/TouchScreenBase.cpp | Makes touch polling cadence configurable; adds release grace window and long-press gating. |
| src/graphics/niche/InkHUD/WindowManager.h | Adds APIs for touch tile selection, app switcher open, and showing a specific applet. |
| src/graphics/niche/InkHUD/WindowManager.cpp | Implements tile hit-testing, app switcher launching, keyboard availability check, and targeted applet switching. |
| src/graphics/niche/InkHUD/Persistence.h | Formatting-only change. |
| src/graphics/niche/InkHUD/InkHUD.h | Adds touch-enabled provider + touch navigation/tap APIs and window-manager pass-throughs. |
| src/graphics/niche/InkHUD/InkHUD.cpp | Implements touch-enabled provider plumbing and touch navigation/tap forwarding. |
| src/graphics/niche/InkHUD/Events.h | Adds touch event entry points and a tap-suppression window for post-long-press release. |
| src/graphics/niche/InkHUD/Events.cpp | Routes touch points into system/user applets with fallback to legacy button semantics; triggers PowerFSM input activity. |
| src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.h | Adds a T5-S3-specific buttons tip renderer (guarded by T5_S3_EPAPER_PRO). |
| src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.cpp | Uses “Tap screen to continue” on touch builds and adds the T5-S3 button tip screen. |
| src/graphics/niche/InkHUD/Applets/System/Notification/TouchStatusApplet.h | New: low-profile “TOUCH OFF” overlay applet. |
| src/graphics/niche/InkHUD/Applets/System/Notification/TouchStatusApplet.cpp | New: renders the touch status bar when touch is disabled. |
| src/graphics/niche/InkHUD/Applets/System/Menu/MenuPage.h | Adds a display-timeout submenu page. |
| src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.h | Adds touch hit-testing hook + display-timeout page population state. |
| src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp | Adds touch-friendly menu layout + touch selection, display timeout menu, and T5 backlight persistence integration. |
| src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h | Adds SET_DISPLAY_TIMEOUT action. |
| src/graphics/niche/InkHUD/Applets/System/Keyboard/KeyboardApplet.h | Expands keyboard layout and adds touch hit-testing + mode toggles (punct/emote). |
| src/graphics/niche/InkHUD/Applets/System/Keyboard/KeyboardApplet.cpp | Reworks keyboard rendering/layout and adds touch input path optimized for touch throughput. |
| src/graphics/niche/InkHUD/Applets/System/AppSwitcher/AppSwitcherApplet.h | New: touch-friendly app switcher system applet. |
| src/graphics/niche/InkHUD/Applets/System/AppSwitcher/AppSwitcherApplet.cpp | New: app switcher UI with icon grid and touch selection/paging. |
| src/graphics/niche/InkHUD/Applet.h | Adds a default onTouchPoint() hook for touch-aware applets. |
| src/graphics/niche/Drivers/EInk/ED047TC1.cpp | Adds safe power-on handler for V2 + improves init error handling (but see review comment). |
| src/PowerFSM.cpp | Integrates T5 backlight/touch timeout + sleep forcing into FSM transitions. |
|
@HarukiToreda bruh... #10241 |
* InkHUD touch rework * Applet Switcher * Update ED047TC1.cpp * trunk fix * Custom tip screen for T5s3 * Update TouchScreenImpl1.cpp * Update ED047TC1.cpp * Delete variant.cpp
What this PR does
This update makes the T5-S3 much easier to use with touch.
Why this change
The T5-S3 has a touchscreen, but using InkHUD still felt too button-heavy.
This PR makes everyday navigation faster and more natural for it and future touchscreen focused InkHUD devices.