Dokey: A Vietnamese Input Method That Rebuilds the Whole Word on Every Keystroke

Vietnamese is typed on standard keyboards through input methods such as Telex and VNI, in which ordinary letter or digit keys add diacritics and tones to the word being typed. Common input methods often produce jumbled or lost letters in browsers and Electron applications, and they add tones to English words. Dokey is a new input method for macOS and Windows, written from scratch, that addresses these problems with three design decisions: (1) the engine keeps only the raw keys of the current word and recomputes the displayed word from them with a pure function on every keystroke; (2) a diacritic or tone key is applied only if the result is still a prefix of a valid Vietnamese syllable, otherwise the keys are shown as typed; and (3) the platform layer applies each correction as a single minimal edit, choosing a delivery strategy per application class. The engine is a dependency-free C++17 library of about 1,300 lines with a C API, used by a Swift/AppKit app on macOS and a Win32 app on Windows. We report the design, the platform layers and an evaluation: all 20,635 automated test cases pass, including a round trip over 3,964 syllables with every tone and a regression corpus of 1,171 English and developer words and 30 Vietnamese sentences; the engine takes a median of 0.7–0.8 µs per key on a 2014 desktop CPU; and 11.9% of keys in the corpus need a correction, with 1.39 deletions per correction on average. We also list what has not been tested, notably real Windows machines and several browsers. The author's company is a member of Anthropic's Claude Startups program and received Claude Team access and API credits through it. Claude (Anthropic) assisted with code, debugging and the drafting of this paper. In the author's own experience it made project work roughly ten times faster: problems that once ended with a long sip of water and a longer stare at the screen now usually end with a working fix. The author reviewed all content and is solely responsible for it; Anthropic did not sponsor, review or endorse this work.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-02
DOI
https://doi.org/10.5281/zenodo.23888334
Primary Topic
Usability and User Interface Design
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Dokey: A Vietnamese Input Method That Rebuilds the Whole Word on Every Keystroke

Do Huy Toan
Zenodo (CERN European Organization for Nuclear Research)
Usability and User Interface Design
article

Dokey: A Vietnamese Input Method That Rebuilds the Whole Word on Every Keystroke

Do Huy Toan
article en

Abstract

Vietnamese is typed on standard keyboards through input methods such as Telex and VNI, in which ordinary letter or digit keys add diacritics and tones to the word being typed. Common input methods often produce jumbled or lost letters in browsers and Electron applications, and they add tones to English words. Dokey is a new input method for macOS and Windows, written from scratch, that addresses these problems with three design decisions: (1) the engine keeps only the raw keys of the current word and recomputes the displayed word from them with a pure function on every keystroke; (2) a diacritic or tone key is applied only if the result is still a prefix of a valid Vietnamese syllable, otherwise the keys are shown as typed; and (3) the platform layer applies each correction as a single minimal edit, choosing a delivery strategy per application class. The engine is a dependency-free C++17 library of about 1,300 lines with a C API, used by a Swift/AppKit app on macOS and a Win32 app on Windows. We report the design, the platform layers and an evaluation: all 20,635 automated test cases pass, including a round trip over 3,964 syllables with every tone and a regression corpus of 1,171 English and developer words and 30 Vietnamese sentences; the engine takes a median of 0.7–0.8 µs per key on a 2014 desktop CPU; and 11.9% of keys in the corpus need a correction, with 1.39 deletions per correction on average. We also list what has not been tested, notably real Windows machines and several browsers. The author's company is a member of Anthropic's Claude Startups program and received Claude Team access and API credits through it. Claude (Anthropic) assisted with code, debugging and the drafting of this paper. In the author's own experience it made project work roughly ten times faster: problems that once ended with a long sip of water and a longer stare at the screen now usually end with a working fix. The author reviewed all content and is solely responsible for it; Anthropic did not sponsor, review or endorse this work.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 12%
Usability and User Interface Design
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon