TEXTSWITCHER v1.2.0ARTICLE :: READ

[ ARTICLES ]

> Why “ghbdtn” means “привет”: how wrong-layout text happens

· 4 min read

If you write in both English and Russian, you have seen it: you start typing a message, look up, and the screen says “ghbdtn” instead of “привет”, or “руддщ” instead of “hello”. Nothing is broken. Your fingers pressed the right keys — macOS was simply using the other input source.

> One key, two letters

A physical keyboard sends key positions, not letters. The active input source decides which character each position produces. On the US layout the key to the right of Tab is “q”; on the Russian ЙЦУКЕН layout the same key is “й”. Every letter key has such a pair:

q w e r t y u i o p [ ]
й ц у к е н г ш щ з х ъ

a s d f g h j k l ; '
ф ы в а п р о л д ж э

z x c v b n m , .
я ч с м и т ь б ю

So “привет” typed with the English layout active becomes g-h-b-d-t-n, because п sits on G, р on H, и on B, в on D, е on T and т on N.

> Why it is always reversible

The mapping is one-to-one: each key position yields exactly one character per layout. That means wrong-layout text loses no information — converting it back is a lookup, not a guess. The hard part is deciding when a word was typed in the wrong layout, because “ruby” is a valid English word and also the keys for “кгин”.

> How TextSwitcher decides

TextSwitcher looks at a finished word (after a space or punctuation) and asks whether it is plausible in the current layout or much more plausible after conversion. Real words and common letter combinations score high; key sequences like “ghbdtn” score near zero in English but form a common Russian word. Only clear cases are corrected, and everything happens on your Mac.

You can try the same conversion manually with the online keyboard layout translator on this site.

Try it yourself: keyboard layout translator.

MORE ARTICLES