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

drivers/touch/cst816: add palm gesture to turn off backlight#1979
josiahcbloomer wants to merge 2 commits into
coredevices:mainfrom
josiahcbloomer:palm-backlight-off

Conversation

@josiahcbloomer

Copy link
Copy Markdown

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

1 participant