Conversation
added compiled windows version to the exec/ folder
Switch homographs to the other layout only when its reading is a top-2000 word and the current reading is unlisted or >=10x rarer. Adds embedded en/he frequency lists and RECAST_FREQ toggle (default on)
taskbar icon and ASCII banner on startup
when a word is typed and corrected, the user will double press to revert it and add to ignore list, if the user wants the word back simply double press again to correct and remove from ignore list chore: refresh Linux/Windows binaries, document exec/ Rebuild `exec/recastLinux` and `exec/ReCast.exe` from the current tree so the committed artifacts include the completion cycle and the Ctrl double-tap gesture. The Windows build is cross-compiled (x86_64-pc-windows-gnu); it imports only system DLLs plus the UCRT, and `build.rs` embeds the icon and version resources through the mingw-prefixed windres, so it is equivalent to a native build. The macOS artifacts are left alone — they can't be linked here — and the README now says which of the four are current. README also gains a note that RECAST_DEBUG logs every typed word.
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.
Everything on
featuressincecd29691. Three user-visible features plus the plumbing they needed.English autocorrect (
src/spell.rs)A noisy-channel corrector —
argmax_c P(c)·P(t|c), Kernighan/Church/Gale — with the two factors added in log space rather than ordered lexicographically, so a candidate can win either by being the likelier slip or by being the far likelier word. The channel model is Brill & Moore string-to-string edits, soapparant→apparentis one decision rather than three unrelated letter edits, which is what bringsmaintainance,restarauntandfisical→physicalinto range. Candidates come from scanning the frequency list, not from generating an edit ring.Runs only under an English layout, only on words the dictionary doesn't know, never on ALL CAPS or anything with a digit.
Auto-complete (
src/complete.rs)Tap Right Shift mid-word to finish it. Tap again to cycle through the next candidates, and once more to get back exactly what you typed, capitalization included — that wrap-around is the safety property, since it makes a wrong guess cost a keypress instead of a deletion.
Candidates are ranked by what the tap actually saves you (letters filled in, weighted by
P ∝ 1/rank), not by raw frequency: a completion that adds one letter to a five-letter prefix isn't worth the key that asked for it. Frequency still dominates a lopsided pair.Abbreviations from
<config>/recast/abbrev.txtexpand when a word is finished, and are offered by the first tap too.Ctrl double-tap (
LastActionin each platform listener)One gesture, two directions, decided by what happened to the word rather than by the tap:
ignore.txton disk included, and correct it after allOnly the word the cursor is still sitting on: the payload is dropped by the next keystroke and by a mouse click, because both directions erase backwards from the cursor. A correctly spelled word arms nothing.
The
ignore.txtrewrite drops only lines that are the word, copies comments and everything else through byte for byte, and replaces the file by rename.macOS fix worth calling out
EVENT_MASKwas missingkCGEventFlagsChanged, and macOS delivers Shift, Ctrl and Caps Lock only as that event type. So the Right Shift completion trigger had never fired on macOS, and the shift behind every capital was invisible to the word buffer. Added the mask bit andhandle_flags_changed, which recovers press-vs-release fromCGEventGetFlagsusing the device-dependent bits (kCGEventFlagMask*can't tell left from right).Testing
83 tests. The unit tests pin the rules;
spell::real_dataandcomplete::real_datapin what those rules do to the lists actually shipped, so a threshold change that looks harmless in isolation shows up.Linux is built, tested and lint-clean. Windows and macOS are type-checked and clippy-clean via cross-target
cargo check— not run on real hardware. The macOS flagsChanged path in particular is new code that wants a smoke test before it's trusted.exec/recastLinuxandexec/ReCast.exeare refreshed from this tree; the macOS artifacts are stale and the README now says so.Known rough edges
The gesture state machine is duplicated across the three platform listeners and has no test coverage — extracting it behind one key-type-generic module is the obvious next change.
🤖 Generated with Claude Code