Skip to content

Tamil typing test: Incorrect error highlighting for vowel sign substitutions #8453

Open

Description

@Lakshmanshankar

Did you clear cache before opening an issue?

  • I have cleared my cache

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Does the issue happen when logged in?

Yes

Does the issue happen when logged out?

Yes

Does the issue happen in incognito mode when logged in?

Yes

Does the issue happen in incognito mode when logged out?

Yes

Account name

LAKSHMANSHANKAR

Account config

{"theme":"dark","themeLight":"serika","themeDark":"serika_dark","autoSwitchTheme":false,"customTheme":false,"customThemeColors":["#323437","#e2b714","#e2b714","#646669","#2c2e31","#d1d0c5","#ca4754","#7e2a33","#ca4754","#7e2a33"],"favThemes":[],"showKeyTips":true,"smoothCaret":"medium","codeUnindentOnBackspace":false,"quickRestart":"off","punctuation":false,"numbers":false,"words":50,"time":60,"mode":"words","quoteLength":[1],"language":"english","fontSize":2,"freedomMode":false,"difficulty":"normal","blindMode":false,"quickEnd":false,"caretStyle":"default","paceCaretStyle":"default","flipTestColors":false,"layout":"default","funbox":[],"confidenceMode":"off","indicateTypos":"off","compositionDisplay":"replace","timerStyle":"mini","liveSpeedStyle":"off","liveAccStyle":"off","liveBurstStyle":"off","colorfulMode":false,"randomTheme":"off","timerColor":"main","timerOpacity":"1","stopOnError":"off","deleteOnError":"off","showAllLines":false,"keymapMode":"off","keymapStyle":"staggered","keymapLegendStyle":"lowercase","keymapLayout":"overrideSync","keymapKeys":"minimal","keymapSize":1,"fontFamily":"Fira_Code","smoothLineScroll":false,"alwaysShowDecimalPlaces":false,"alwaysShowWordsHistory":false,"singleListCommandLine":"on","capsLockWarning":true,"playSoundOnError":"off","playSoundOnClick":"off","soundVolume":0.5,"startGraphsAtZero":true,"showOutOfFocusWarning":true,"paceCaret":"off","paceCaretCustomSpeed":100,"repeatedPace":true,"accountChart":["on","on","on","on"],"minWpm":"off","minWpmCustomSpeed":100,"highlightMode":"letter","typedEffect":"keep","typingSpeedUnit":"wpm","ads":"result","hideExtraLetters":false,"strictSpace":false,"minAcc":"off","minAccCustom":90,"monkey":false,"repeatQuotes":"off","resultSaving":true,"oppositeShiftMode":"off","customBackground":"","customBackgroundSize":"cover","customBackgroundFilter":[0,1,1,1],"customLayoutfluid":["qwerty","dvorak","colemak"],"customPolyglot":["english","spanish","french","german"],"monkeyPowerLevel":"off","minBurst":"off","minBurstCustomSpeed":100,"burstHeatmap":false,"britishEnglish":false,"lazyMode":false,"showAverage":"off","showPb":false,"tapeMode":"off","tapeMargin":50,"maxLineWidth":0,"playTimeWarning":"off"}

Current Behavior

When typing the expected word சோழன், different types of mistakes produce inconsistent error highlighting.

  1. Consonant substitution: Typing மோழன் instead of சோழன் correctly highlights மோ as incorrect.
  2. Vowel sign substitution: Typing சொழன் instead of சோழன் causes the entire word to be underlined and rendered in white text, even though only the first orthographic unit is incorrect.

Expected Behavior

Error highlighting should be consistent at the orthographic-unit level.

  1. Consonant substitution: When typing மோழன் instead of சோழன், only மோ should be marked incorrect.
  2. Vowel sign substitution: When typing சொழன் instead of சோழன், only சொ should be marked incorrect. The remaining text, ழன், should retain its normal styling because it matches the expected text.

Steps To Reproduce

  1. Go to Settings → Layout and change the keyboard layout to Tamil99, or open Monkeytype Layout Settings
  2. Go to Custom → Change, enter சோழ, and click OK.
  3. Type சோழ using the Tamil99 keyboard layout:
    • Press [ followed by x to type சோ.
    • Press / to type ழ.
  4. To reproduce the consonant substitution error: Instead of typing சோ, press k followed by x to type மோ, then press / to type ழ. Observe the error highlighting.
  5. To reproduce the vowel sign substitution error: Press [ followed by c to type சொ, then press / to type ழ. Observe the error highlighting.

Environment

  • OS: Ubuntu 26.04
  • Browser: Brave
  • Browser Version: 1.93.129

Anything else?

Unicode code points alone are insufficient to represent Tamil characters as typing units. Grapheme clusters work for most use cases, but there are two notable exceptions: க்ஷ and ஶ்ரீ, which are split into multiple grapheme clusters by Intl.Segmenter.

const segmenterGraphme = new Intl.Segmenter("ta", {
  granularity: "grapheme",
});

function splitGraphemes(text: string): string[] {
  return Array.from(
    segmenterGraphme.segment(text),
    ({ segment }) => segment,
  );
}

const word = "சோழன்";
console.log(word.split(""));
// ["ச", "ோ", "ழ", "ன", "்"]

console.log(splitGraphemes(word));
// ["சோ", "ழ", "ன்"]

console.log(splitGraphemes("க்ஷ"));
// ["க்", "ஷ"]

console.log(splitGraphemes("ஶ்ரீ"));
// ["ஶ்", "ரீ"]

This makes error highlighting and backspace handling more complex if the typing engine relies solely on grapheme boundaries.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions