Repository navigation
better repeat logic for text and ... - #164
Open
bfritscher wants to merge 1 commit into
Open
bfritscher wants to merge 1 commit into
bfritscher wants to merge 1 commit into
Conversation
|
Can this work with numerals as well as letters? E.g. “600” instead of “60 x2” |
NyaMisty
pushed a commit
to NyaMisty/carnac
that referenced
this pull request
Mar 11, 2023
doggy8088
added a commit
to doggy8088/carnac
that referenced
this pull request
Oct 9, 2026
…Code52#164) (#7) * Only summarise repeated typed characters after four in a row A repeated key was always collapsed to "x N" from the second press, so ordinary words showed up as "hel x 2 o" and "1000" as "10 x 3". Letters, digits and full stops are now shown as typed for runs of up to three and summarised as "x N" from four. Other keys and anything pressed with a modifier still collapse from two, as before. Based on the idea in Code52#164. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Treat any single visible character as a typed character Address review feedback: repeated brackets, operators and quotes ("((", "==", "//") also read naturally as typed, so classify by Unicode category (letters, digits, punctuation, symbols) instead of a letter/digit allow-list. The classification uses the raw key input, so named keys and arrows ("Left" -> an arrow glyph) keep collapsing from two, and a single text element is required so surrogate pairs and decomposed accents count. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Refine typed-character detection after review - Classify with char.IsLetter/IsNumber/IsPunctuation/IsSymbol instead of a long UnicodeCategory switch, and only when a key is actually repeated. - Treat a space as a typed character ("end. Next" no longer shows "x 2") and look through the padding of the numpad operators (" + "). - Digits are only summarised from ten in a row, so "1000000" no longer reads as "10 x 6"; other typed characters still summarise from four. - Add tests that go through the real KeyProvider for digits, numpad keys and shifted symbols. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Keep runs consistent and make the provider tests focus-independent - IsRepeatedBy also compares the modifier state, so a run cannot mix typed characters with the same text pressed with a modifier and the result no longer depends on which came first. - Skip the text-element scan for the common single-char case. - The provider tests merge their key presses under a fixed process instead of whichever window has the focus while the suite runs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Count AltGr characters as typed and simplify the classification - Decide "typed" from the raw input only, not from the modifier flags: a shortcut has its modifiers in the input ("Ctrl", "L"), while a character typed with AltGr, which Windows reports as Ctrl+Alt, is a single character and must not collapse from two ("{{" stays "{{"). - Drop the text-element scan (a surrogate pair is enough) and compute the threshold once per group instead of on every text rebuild. - The provider tests assert that key presses arrived at all, so a missing foreground window fails with a message instead of an empty aggregate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Spell out the non-ASCII test data as escapes An editor or a formatter that normalises Unicode would turn a decomposed or otherwise unusual literal into another one and change what the test checks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Say when an AltGr character reads as typed With the US key names AltGr+7 is "Ctrl", "Alt", "7" and collapses from two like any shortcut; it is one character, and reads as typed, once the keys are named after the keyboard layout. Comment only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: merge check <merge-check@example.invalid>
This was referenced Oct 10, 2026
|
Hi there! 👋 I (@doggy8088 / Will Huang) have stepped in to take over active maintenance of Carnac at doggy8088/carnac (project website: https://carnac.gh.miniasp.com/). This issue regarding repeated key grouping (x 2, x 3, etc.) and repeated shortcuts has been resolved in my fork! Context & What Changed
Availability
|
This was referenced Oct 10, 2026
Open
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.
This should solve issue #92