Skip to content

InkHUD: Add full touch support to T5s3#10286

Merged
thebentern merged 11 commits into
developfrom
InkHUD-Touch
Apr 25, 2026
Merged

InkHUD: Add full touch support to T5s3#10286
thebentern merged 11 commits into
developfrom
InkHUD-Touch

Conversation

@HarukiToreda

Copy link
Copy Markdown
Contributor

What this PR does

This update makes the T5-S3 much easier to use with touch.

  • You can now tap menu items and settings directly.
  • You can swipe left/right to move between screens.
  • In split-screen mode, you can tap a tile to select and control it.
  • Pressing Home opens an app list so you can jump to any app quickly.
  • IO48 button:
    • Short press: turn touch on/off (helps avoid accidental taps in your pocket).
    • Long press: turn backlight on/off.
  • Added a simple tip screen that explains what each button does (BOOT, IO48, PWR, HOME).
  • On touch devices, tips now say “Tap screen to continue”.
  • Free-text keyboard is fully touch usable.

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.

20260424_154821 20260424_154804 20260424_154739

@HarukiToreda HarukiToreda self-assigned this Apr 24, 2026
@HarukiToreda HarukiToreda added enhancement New feature or request hardware-support Hardware related: new devices or modules, problems specific to hardware InkHUD Issues directly related to InkHUD UI labels Apr 24, 2026
@github-actions github-actions Bot added the needs-review Needs human review label Apr 24, 2026
@HarukiToreda HarukiToreda requested a review from mverch67 April 24, 2026 20:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@HarukiToreda HarukiToreda requested a review from Xaositek April 24, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/graphics/niche/Drivers/EInk/ED047TC1.cpp
Comment thread src/graphics/niche/Drivers/EInk/ED047TC1.cpp Outdated
Comment thread variants/esp32s3/t5s3_epaper/variant.cpp
@thebentern thebentern merged commit 7421953 into develop Apr 25, 2026
78 checks passed
@thebentern thebentern deleted the InkHUD-Touch branch April 25, 2026 10:22
@vidplace7

Copy link
Copy Markdown
Member

@HarukiToreda bruh... #10241

mariotti pushed a commit to mariotti/firmware that referenced this pull request May 6, 2026
* InkHUD touch rework

* Applet Switcher

* Update ED047TC1.cpp

* trunk fix

* Custom tip screen for T5s3

* Update TouchScreenImpl1.cpp

* Update ED047TC1.cpp

* Delete variant.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hardware-support Hardware related: new devices or modules, problems specific to hardware InkHUD Issues directly related to InkHUD UI needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants