Repository navigation
feat(keypad): support the Sundial keypad's physical layout and holds - #44
Draft
manuel-rtsch wants to merge 4 commits into
Draft
manuel-rtsch wants to merge 4 commits into
manuel-rtsch wants to merge 4 commits into
Conversation
Detect every gxa535_* module instead of only the old gxa535_keyboard name, so the Sundial is recognised and its layout is used. Add HoldToAct: a tap is delivered on release, while a 400 ms timer fires a hold without releasing the key. Map the Sundial's Tab and Enter holds to Back and Options, and hold Previous/Next for left/right; a tap still sends the media command. Use one KeypadTiming.LONG_PRESS_MS for these holds, T9 long presses and the Back-to-dialer gesture. Draw the onboarding Sundial keys as the physical 3x3 ring, add the hold hints there and in Keypad mapping, and cover the new behaviour with tests and an updated screenshot.
…e devices KeypadTiming.LONG_PRESS_MS was hardcoded to 400 ms, replacing the ViewConfiguration.getLongPressTimeout() call the app used before. Read the system value again so a device or accessibility setting is honoured. Keep SystemKeys.LONG_PRESS_MS at 600 ms: opening the dialer is a deliberate gesture and should stay longer than an ordinary keypad hold. Replace the gxa535_* prefix with an allowlist of the four module device names (plus the older gxa535_keyboard). gxa535_phone shares the prefix but carries the phone's own keys, and a future device should be added deliberately rather than trusted by name alone. Tests: :sidekit:testDebugUnitTest --tests '*KeypadDetectorTest' --tests '*NavControlsTest'
The test lives in the app module because that is where Robolectric is available, but its package now matches design.input instead of apps.settings. Tests: :app:testDebugUnitTest --tests '*HoldToActTest'
performSundialHold called onBackPressedDispatcher.onBackPressed() directly, which Android Lint reports as GestureBackNavigation. Suppress it there: the call comes from a hardware-key hold, not a system back gesture, and the dispatcher still routes through registered callbacks. dispatchTranslated now owns the super.dispatchKeyEvent() call, so it needs the same RestrictedApi suppression the override had.
Contributor
Author
|
CI is now 9/10. The remaining Dependency review failure is not from this change: the action reports The earlier Android Lint failure was fixed in 298fa22: |
manuel-rtsch
added a commit
to manuel-rtsch/Sidekit
that referenced
this pull request
Nov 10, 2026
Share the Item API with HarlenPostill#45 so the two branches merge cleanly, and leave the Sundial demo layout to HarlenPostill#44.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Closes #38.
Recognise the Sundial keypad and support its physical ring and holds.
gxa535_media,gxa535_qwerty,gxa535_t9,gxa535_gamepad, plus the oldergxa535_keyboard).gxa535_phoneis the phone's own key device and is not trusted for detection.HoldToAct: a tap is delivered on release, a hold fires after the system long-press timeout without releasing the key.ViewConfiguration.getLongPressTimeout()for T9 and Sundial holds. Back-to-dialer keeps its own 600 ms threshold.How to test
adb shell settings put secure long_press_timeout 700), relaunch, and confirm the hold threshold follows it.Real-device testing
gxa535_media,gxa535_qwerty,gxa535_t9andgxa535_gamepadfor the modules.gxa535_phonedid not change the detected module.long_press_timeout=700, holds followed the longer threshold; restored to 400 afterwards.Checklist
mainand this PR targetsmain.Build and automated test results
Built with
./gradlew :app:installDev(APK produced; installed withadb install -r -d app/build/outputs/apk/dev/app-dev.apkbecause the previous dev build had a higher versionCode).Known issues and exceptions
gxa535_*module must be added toKeypadDetector.MODULE_DEVICES. This avoids trustinggxa535_phoneby name alone.Maintainer review
Changes to
mainrequire approval from @HarlenPostill. Request review only when the required testing is complete.