Repository navigation
Conversation
…touches One switch in Text correction, off by default. When on, the keyboard learns where the user touches each letter key, from the words finally committed (autocorrected word, picked suggestion, reverted correction, or a letter retyped after deleting a neighboring one). Once a key has 30 touches, a touch near the border to a neighboring key is assigned to the key the user most likely meant, and the dictionary gets the corrected coordinates too. The shift is capped to a third of a key. With the switch off, nothing is recorded and key detection runs the unchanged code path. Never active in password fields or incognito mode. All logic is in the heatmap package (TypingAdaptation, TypingHeatmap, KeyboardGeometry); InputLogic, KeyDetector and PointerTracker only call single hooks. Data is stored locally in no-backup storage and can be included in the keyboard's own backup. A statistics screen shows the heatmap, the most frequent misses and the weekly miss rate. Discussed in LeanBitLab#676. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuiaMhLXwhErf9shhrr1uD
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.
As discussed in #676, this is the slimmer version of #671 for the 4.3.0 beta.
What it does
One switch in Text correction, off by default: "Adapt to my typing".
When on, the keyboard learns where the user touches each letter key, using the words that are finally committed as ground truth (autocorrected word, picked suggestion, reverted autocorrection, or a letter retyped after deleting a neighboring one). Once a key has 30 touches, a touch near the border to a neighboring key is assigned to the key the user most likely meant. The dictionary gets the corrected coordinates too, so autocorrection benefits as well. The shift is capped to a third of a key.
Your concerns from #671
KeyDetector(+3/-1),PointerTracker(+5/-1),InputLogic(+9)BackupRestorePreference(+25/-3)latin/heatmap(TypingAdaptation,TypingHeatmap,KeyboardGeometry), plus the statistics screen and 17 unit tests.Privacy
Statistics screen
Text correction → "Typing heatmap": heatmap per key, most frequent misses, misses per week and misses before/after adaptation. Easy to drop if you prefer.
Tests
TypingHeatmapTest: 17 tests, all pass.InputLogicTest: only the 8caps*failures (RobolectricDYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION), which also fail on current main.Closes #676