Pular para o conteúdo

Output Matching

Este conteúdo não está disponível em sua língua ainda.

At the apostrophe in “it’s time”, Magic Sturdy can send the apostrophe alone or type “‘s” with a chord. Matching those outputs gives the analyzer candidate actions before it checks layers, held keys, or prices. Which output matches can also depend on what has already been written or which keys came before.

Keymaxx binds the layout to the prepared corpus and indexes the layout’s possible outputs in a prefix trie. Outputs with the same beginning share a branch, which can end one output and continue to a longer one. In Magic Sturdy, the ordinary apostrophe stops at the first character of “‘s”. The branch continues to the two chords that type the whole suffix: and .

Read 'Read sStartApostropheAdvance 1'sAdvance 2

Reading the “s” adds both two-character offers and keeps the one-character apostrophe offer. Each offer carries how far its output would take the search. The trie can stop once the next character has no matching branch; the offers it collected are still available. Longer text beyond the deepest relevant output can wait for the next step.

One output can also have several producers. After the written “k” in Opal’s “key”, the terminal for “e” includes the ordinary letter key and the Magic rule. The text gives both the same potential one-character advance. The Magic rule still needs the preceding physical . The next chapter follows that check and the silent actions that can enable a press, such as an acquisition of Shift.

An offer describes which prefix a press could supply. The apostrophe key leaves an “s” still to type; either chord advances over the whole suffix. The decoder follows the resulting positions until it finds a complete route.

The candidate search must recognize what the layout writes even when its Unicode spelling differs from the corpus. Vietnamese XKB puts “â” and the combining dot below on two base-layer keys. The two presses shown type “ậ”.

Before typing
Output so far: empty
Written characters matched: 0
Keystrokes
Playback

Normalizing each key’s output on its own leaves “â” followed by the separate dot-below scalar. That is a different spelling from the one code point “ậ”. Only comparing across presses lets the search see that the two sequences are canonically equivalent.

Keymaxx matches across presses with an automaton over Unicode scalars, the code points that make up the text. The prepared corpus describes the required scalars and ordering constraints for each observed written character. During the search a cursor marks the progress through that description. The decomposition of “ậ” is the base “a” (U+0061), dot below (U+0323), and circumflex (U+0302). The marks are in different combining classes. After matching “a”, the cursor can accept either outstanding mark and record which one still has to match.

After aBoth marks left◌̂ remainingU+0302◌̣ remainingU+0323ậ complete+ U+0323+ U+0302+ U+0302+ U+0323

The diagram starts just after “a”. In the XKB route the first press supplies the circumflex along with the vowel, so the dot below is the remaining obligation. The other branch shows the Unicode order where the dot comes first. Both orders meet at the same normalization state once all its required marks have arrived. The diagram is about Unicode spellings; the keys on a layout decide which of those spellings it can actually send.

Marks in the same combining class retain their specified order. The cursor remembers how much of each class’s required sequence has arrived. This shares the continuation when different orders leave the same obligation. The matcher creates transitions from the states the layout’s outputs actually reach.

One press can finish a character and start the next. In Microsoft Arabic (101), the physical G position with Shift sends lam and alef with hamza above, “لأ”. To start “لأُجيب” (“so that I answer”), the next press adds damma to the alef. Both letter positions are on the left, so Right Shift can stay down through the two presses.

Before typing
Output so far: empty
Written characters matched: 0
Keystrokes
Playback

The first letter press consumes the whole fragment and advances past lam. It leaves the alef attached to the next written position, where the cursor waits for the damma. The written offset and the remaining obligation answer different questions. Each event still has its original output.

An alphabet tells the matcher which characters exist in the corpus. A spanning output needs a run of those characters in the same sequence. Magic Sturdy’s Magic key can send “ but” after a comma. That makes it a candidate after the comma in “no, but why?”. The separate lines “no, by noon” and “but why?” together supply every character in “, but”. They supply different runs in the actual text: the comma in the first line is followed by “ by”, and the second starts directly with “but”. The Magic offer for “, but” needs the first corpus.

The canonical matcher joins the two corpus views from the first page. Take the Gujarati phrases “પ્રભાત થાય” and “સુપ્રભાત સૌને”. The first-character index can find “પ્ર” at the start of “પ્રભાત” and inside “સુપ્રભાત”. Each position pairs the same remaining spelling, “ભાત”, with its own WordChains node. After finishing that suffix and reading the space, the matcher follows only the next words that the corresponding node records.

Positions after reading પ્રWitnessed next wordRead ભાત and a spaceRead ભાત and a spaceપ્રભાતRemaining: ભાતસુપ્રભાતRemaining: ભાતથાયFrom પ્રભાત થાયસૌનેFrom સુપ્રભાત સૌને

The matcher remembers the surviving positions for each prefix it has read, so the next character extends that set without starting over. At the end of a spelling, the corpus determines whether the sequence also ends or another word follows. At the far edge of the bounded index, an open path means that the index can no longer rule out a continuation. The decoder still checks the actual text before admitting a physical path.

Some layouts can use the usual written-character trie for the entire search. The ANSI QWERTY layout and an ordinary English sample made of single-scalar letters and spaces can use this representation. The proof checks both the output the layout can send and the corpus characters it must match. When the layout’s emitted characters already end at normalization boundaries and cannot change across presses, the aligned search gives the same answer. The Vietnamese example needs the other path because the next key can change how the earlier vowel matches.

The written-character boundary sets the unit of alignment. A normalization boundary sets where reordering or canonical composition can stop. A safe cut for pricing also needs agreement on the typing state.

An Output Repeat key can replay the last output. The end of “treatment” on Magic Sturdy shows why that is a length, not a fixed number of characters: Magic after the ordinary “t” sends “ment” in one press, while the letter route sends the same ending one character at a time.

At the end of treatment, Magic Sturdy can press T then Magic, with the last event writing ment, or press T, M, E, N, T, with the last event writing t.
Types tment

Both routes leave “ment” and “t” as written suffixes. The previous event tells Repeat whether to replay four characters or one.

Read menRead tRead tSuffix linkStartmenmentFour-character outputtOne-character output

Keymaxx stores the endings that layout rules can read in a suffix automaton. Reading the four characters “ment” reaches the node for that ending. Its suffix link retains the shorter ending “t”, so one state can answer either length query. Each new character updates the written suffix with a table lookup. Physical history remains separate: it can record which output length the earlier press established or which key triggers a Magic rule.

The target can make several written histories equivalent for the next lookup. Nordrassil Vanilla has an Output Repeat key, and all three positions below want a written “l”. After “ca” in “calm” and “co” in “cold”, Repeat cannot supply “l”. After “cal” in “call”, both the ordinary letter key and Repeat can supply the final “l”.

Nordrassil Vanilla: next character lcalmAfter cacoldAfter cocallAfter calOne contextDifferent context

That shared lookup is a quotient: one entry stands for raw text positions whose relevant observations agree. Keymaxx starts from the same forward trie node and compares the answers from the readers that can matter there. It keeps the selected outcome of each live written-context rule, and for each live repeat reader, the matching output lengths and any layer that licenses them.

When a pair of presses rewrites earlier text, as in JIS Kana’s voicing rule, the lookup keeps the exact written suffix state. It keeps a declaration-specific view of that state for each alternate fingering whose output fits the target. Equal observations can reuse the candidate lookup. Possible steps can reuse the same row when the physical decoder state also agrees.

The first lookup can agree even when later steps differ. At the end of “at” in Afterburner’s “at the end” and “be” in “be the change”, both positions need a space. At the next written position, Skip Magic can supply the “t” of “the” in the first phrase: it reads the T press before the space. In the second phrase that same history slot holds E, so Skip Magic would supply “e”.

After atAfter beSharedBefore theBefore the

A reusable continuation has to preserve everything that a later step can read. Here the difference is physical history. A layout that reads written suffixes can likewise distinguish a pair of histories at a later position. The word graph keeps the exact suffix state, decoder state, remaining spelling, and relevant following text.

The text lookup has narrowed the routes by what they can write. The next chapter follows the physical actions that make those routes legal.