Skip to content

drivers/touch/cst816: add palm gesture to turn off backlight - #1979

Open
josiahcbloomer wants to merge 2 commits into
coredevices:mainfrom
josiahcbloomer:palm-backlight-off
Open

josiahcbloomer wants to merge 2 commits into
coredevices:mainfrom
josiahcbloomer:palm-backlight-off

Conversation

@josiahcbloomer

Copy link
Copy Markdown
Contributor

Summary

Tap the screen with your palm and the backlight turns off, mirroring a gesture found on many major smartwatches on the market. Adds a new option: Settings → Display → Backlight → "Palm to sleep", which is on by default.

How the palm is detected

The CST816 seems to report this itself. Register 0x01 reads 0xAA for a palm, and doesn't seem to be for anything else. it isn't in the documented gesture list and nothing in the tree referenced it. Found by dumping the chip's register block on device and testing repeatedly on my PT2.
I would love if some more people would build and test on their watches.

Tests

Built for obelix@pvt. tests pass.
Tested on my Core Time 2. Haven't noticed any false positives yet.

Co-authored with Claude.

josiahcbloomer and others added 2 commits August 31, 2026 16:49
based on my testing, the CST816 appears to report a palm covering the screen as gesture 0xAA. it is not in the
documented gesture list; it was found by dumping the chip's register block on device while I tried a number of different touch gestures.
this is now reported by the driver

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Josiah <josiah@bloomer.cc>
adds a new global touch gesture and corresponding settings toggle - tapping the screen with your palm now immediately turns off the backlight, as if the timer expired. this mirrors the gesture functionality of many mainstream smartwatches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Josiah <josiah@bloomer.cc>
devuterian added a commit to devuterian/PebbleOAO that referenced this pull request Sep 8, 2026
Adapt coredevices#1979 by Josiah Bloomer, preserving its
CST816 palm detection and backlight preference. Dismiss ordinary
popups and return to the selected watchface without restarting it.
Keep system apps, low-power mode, reset, critical dialogs and alarms
protected from the return action.

Add regression tests for return behavior, palm event delivery and
backlight wake after dismissal. Document Time 2 sideloading.

Co-authored-by: Josiah <josiah@bloomer.cc>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: GPT-6 Astra <noreply@openai.com>
Signed-off-by: devuterian <49933873+devuterian@users.noreply.github.com>
@gmarull

gmarull commented Sep 17, 2026

Copy link
Copy Markdown
Member

Please, open first a new PR to add support for the gesture only.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants