Expand description
Key-position maps between US QWERTY and Russian ЙЦУКЕН.
A layout mistake changes which character a key types, not which key was pressed, so
correction is a lookup per key rather than a transliteration: g and п share a key, and so
do [ and х. The map covers the 33 keys that type a Russian letter, unshifted and shifted:
32 keys that both Russian layout variants share, and the ё key, which the variants put in
different places (see Keyboard).
Every conversion works one UTF-16 unit at a time and passes a unit outside the map unchanged, so the output has the length of the input. Digits, the remaining punctuation, other scripts and unpaired surrogates come through as they were; nothing is normalized or decoded.
Enums§
- Keyboard
- Russian layout variant. In this map the two variants differ only in the key that types ё.
- Mapping
- Direction of a conversion.
Functions§
- convert
- Convert
textunit by unit. The result has the same length, and a unit the map does not cover is copied unchanged. - is_
letter - Whether a unit is an EN/RU letter:
A-Z,a-z,А-я,Ёorё.Mapping::Manual, the word session and language context detection all use this letter set.