Documentation · Hotkey and layouts
Lang Switcher with three or more layouts: a source–target pair or a cycle
With two layouts, there’s nothing to set up. With three or more, choose “Pair” (“Source:” and “Target:”) or “Several layouts” — a cycle of up to eight, in the order you choose.
Two layouts
If Windows has two layouts, there’s nothing to set up: the word goes to the other layout, and the next press brings it back.
Three or more: a pair or a cycle
Tray menu → “Settings…” → the “Layouts” section. There are two modes:
- “Pair” (the default): choose “Source:” and “Target:”. The word goes from one to the other and back, and the other layouts stay out of it. At first, the fields show the first two layouts in Windows.
- “Several layouts”: each press moves the word to the next layout in the cycle, and after the last one you get back what you typed. Check the layouts you want in the list under “Cycle: the tick takes part, the buttons set the order”, and use “Up” and “Down” to set the order.
Click “OK” or “Apply”, and the mode takes effect. A cycle holds up to eight layouts: if you try to check a ninth, the box stays empty, and you hear a dull thud.
The lists name each layout the way its own language does: “English (United States)”, “Русский (Россия)”, “Українська (Україна)”. If two layouts share a name, the layout code appears next to it.
Where the word goes
The program remembers the layout of every keystroke and takes the direction from the layout of the word’s first letter, not from the letters themselves.
- In a pair: from the source to the target and back.
- In a cycle: to the layout that comes after the one you typed in. Say your cycle is English, Russian and Ukrainian, and you meant to type hello, but the Ukrainian layout was still on. The first press gives you hello in English, the second moves the word on to Russian, and the third brings back what you typed.
- A layout that’s in neither the pair nor the cycle: a word typed in it stays as it is. The press does nothing, and you hear a single click.
If the word went the wrong way
- Check what’s in effect. At the bottom of the settings window, the “State” section shows “Acting pair: …”, or “Acting cycle: …” in “Several layouts” mode. Next to it is how many times the program couldn’t choose a target layout: “selection failures: …”.
- Press again. In a cycle, the word moves on to the next layout, and after the last one you get back what you typed.
- You switched the layout in the middle of a word (
руд, thenAlt+Shift, thenlo, when you meant hello): the first press fixes the word correctly, but the second won’t bring back exactly what you typed. - A layout you’ve just added in Windows shows up in the program once you switch to another window or field.
Selected text
Selected text has no keystrokes, only letters, so the program works out each word’s layout from its letters and moves the word to the next layout in the cycle. If the cycle has two layouts with the same alphabet (Russian and Ukrainian, or two English ones), a word made only of letters they share could belong to either, so the direction comes from the window’s layout. A word with a letter that only one of them has (ї, є, ґ or ы, э, ъ, ё) goes the right way.
Chinese, Japanese and Korean layouts can’t join the cycle and don’t show up in the settings: here’s why.
In the settings file
The [layouts] section of %APPDATA%\Lang_Switcher\config.toml:
[layouts]
mode = "cycle"
pair_source = "0x00000409"
pair_target = "0x00000419"
cycle = ["0x00000409", "0x00000419", "0x00000422"]
mode is pair or cycle. Layouts are written as Windows language codes: 0x00000409 is English (United States), 0x00000419 is Russian, and 0x00000422 is Ukrainian; for a language with two layouts, it’s the code of the layout itself. The cycle takes the first eight. Edit the file while the program isn’t running.
See also
Questions and problemson GitHub Issues ↗ or by email: send.me@panda-pishet-kod.dev