Repository navigation
Key sound and haptic styles; nine-key lone key shows its initial - #129
Merged
Merged
Conversation
- 按键音效 offers 系统 plus five clicks synthesized by scripts/generate_key_sounds.py (清脆, 机械, 木质, 打字机, 气泡), played through SoundPool as UI sonification; choosing one previews it once. - 震动手感 offers 清脆 (default: PRIMITIVE_TICK / EFFECT_TICK / 8 ms), 有力 (PRIMITIVE_CLICK / EFFECT_CLICK / 12 ms) and 系统 (KEYBOARD_TAP). One-shot fallbacks stay at 8-12 ms because longer pulses ring on linear motors such as Xiaomi's X-axis motor. Both styles are archived. - 关于 → 诊断 lists the vibrator's capabilities. - Nine-key: a lone 4/5/7/8/9 now shows the top candidate's initial (4 -> h) instead of the bare digit; the rail highlights the same letter. - The style enums live in data so panel and keyboard can both use them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lone 4/5/7/8/9 first renders the raw digit, then Rime's answer reuses that strip slot. The candidate TextView was MATCH_PARENT, so setText kept the digit's width and clipped the character. Use WRAP_CONTENT so a wider candidate relayouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Folds into a re-release of 0.0.5-beta.1 (the published beta5 will be replaced).
scripts/generate_key_sounds.py(清脆, 机械, 木质, 打字机, 气泡; 48 kHz mono, under 80 ms, deterministic, no third-party rights). Played throughSoundPoolas UI sonification; choosing one previews it once.PRIMITIVE_TICK/EFFECT_TICK/ 8 ms), 有力 (PRIMITIVE_CLICK/EFFECT_CLICK/ 12 ms) and 系统 (KEYBOARD_TAP). One-shot fallbacks stay at 8–12 ms because longer pulses ring on linear motors (e.g. Xiaomi's X-axis motor), the "muddy" feel reported on a Xiaomi 15. The strength slider scales both bundled styles.datasopanelandkeyboardcan share them.Test plan
testDebugUnitTest375/375 (newaLoneKeyAlignsToTheTopCandidatesInitial),lintDebugno errorskey_sound_style=mechanicaland an app-owned sonification track plays; 清脆 haptics logPrimitive=TICK(scale=…); nine-key 4/5/7/8 show h/l/s/t with the rail matching🤖 Generated with Claude Code