Skip to main content

Crate skey_engine

Crate skey_engine 

Source
Expand description

skey-engine — Stateless Vietnamese input method engine.

Letter-based accumulator model for Vietnamese input. Key features:

  • Stateless: input string → output string
  • Letter struct with variant + tone tracking
  • Modifier keys mutate the last vowel in place
  • Precomputed UTF-8 tables for output
  • Correct tone placement for all diphthong/triphthong cases

Modules§

charset
Vietnamese charset conversion.
engine
Vietnamese IME engine — Letter-based accumulator model. Each keystroke produces a Letter struct. Modifier keys (w, tone, z) mutate the last matching vowel in place. UTF-8 output via precomputed tables.
spelling
Vietnamese CVC (Consonant-Vowel-Consonant) spelling validation.
tables
Precomposed UTF-8 Vietnamese character lookup tables. tone 0=none, 1=grave, 2=acute, 3=hook, 4=tilde, 5=dot
vseq
Vowel sequence table — models Vietnamese vowel clusters for hook/breve transformations (inspired by fcitx5-unikey’s VSeqList).

Structs§

SkeyEngine
Opaque engine handle — holds only configuration.

Enums§

Method
Input method.

Functions§

skey_charset_decode⚠
skey_charset_encode⚠
skey_charset_free_buf⚠
skey_charset_remove_tone⚠
skey_engine_add_word⚠
skey_engine_clear_words⚠
skey_engine_dict_words⚠
All embedded dictionary words joined by ‘\n’ (sorted). Caller frees with skey_free_string().
skey_engine_free⚠
skey_engine_is_valid⚠
skey_engine_new⚠
skey_engine_set_auto_restore⚠
skey_engine_set_bracket_uo⚠
skey_engine_set_dict⚠
skey_engine_set_free_marking⚠
skey_engine_set_method⚠
skey_engine_set_short_w⚠
skey_engine_set_tone_style⚠
tone_style: 0=traditional (hoà, thuỷ), 1=modern (hòa, thủy). Default modern.
skey_engine_transform⚠
skey_free_string⚠