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.
12:00Lang Switcher — SettingsGeneralHotkeyLayoutsExclusionsDiagnosticsPanda KoderSETTINGSGeneralStartup, sound, tray flag, language and lookStart when I sign inSound feedbackFix the selected textLayout flag in the trayNEWThe program icon shows the flagof the current layoutTell me about program updatesInterface languageEnglishAppearanceMatch systemLightDarkCloseLang Switcher — SettingsGeneralHotkeyLayoutsExclusionsDiagnosticsPanda KoderSETTINGSLayoutsBetween which layouts to fix textPairSeveral layoutsSourceEnglish (United States)TargetРусский (Россия)CloseLang Switcher — SettingsGeneralHotkeyLayoutsExclusionsDiagnosticsPanda KoderSETTINGSLayoutsBetween which layouts to fix textPairSeveral layoutsCycle: the tick takes part, the buttons set the orderEnglish (United States)Русский (Россия)Українська (Україна)UpDownCloseLANG SWITCHERworkingSuspendPauseSettings…Start when I sign inWrite to the author…AboutExitright-click12345
12:00GeneralGeneralLayout flag in the trayCloseLayoutsLayoutsCloseLayoutsPairSeveral layoutsSourceEnglish (United States)TargetРусский (Россия)PairSeveral layoutsCycle: the tick takes part,the buttons set the orderEnglish (United States)Русский (Россия)Українська (Україна)UpDownLANG SWITCHERworkingSuspendPauseSettings…Write to the author…AboutExitright-click12345
Tray menu → “Settings…” → “Layouts” → “Several layouts” → check the layouts for the cycle.
Pair — a source and a targetLayoutsPairSeveral layoutsSourceEnglish (United States)TargetРусский (Россия)Several layouts — a cycleLayoutsPairSeveral layoutsCycle: the tick takes part, the buttons set the orderEnglish (United States)Русский (Россия)Українська (Україна)UpDown
Paira source and a targetLayoutsPairSeveral layoutsSourceEnglish (United States)TargetРусский (Россия)Several layoutsa cycleLayoutsPairSeveral layoutsCycle: the tick takes part,the buttons set the orderEnglish (United States)Русский (Россия)Українська (Україна)UpDown
The “Layouts” section in both modes: a pair and a cycle of three checked layouts.

The mode, the layouts and their order take effect right away; there’s nothing to save. 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. In the “Diagnostics” section of the settings window, the “Fixes: …” line lists the layouts in order. “Details for the author” shows “Acting pair: …”, or “Acting cycle: …” in “Several layouts” mode, and 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 (руд, then Alt+Shift, then lo, 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.
DiagnosticsKeep a journalOnly operation names and error codes, not a single keystrokeJournal folderOpen the journal folderSave the journalWrite to the author…WorkingFixes: English (United States) → Русский (Россия) → Українська (Україна)Key: PauseStart when I sign in: onDetails for the authorDetails for the authorSETTINGSDetails for the authorActing cycle: English (United States) → Русский (Россия) →Українська (Україна) · no selection failuresCopyClose123
DiagnosticsKeep a journalJournal folderOpen the journal folderSave the journalWrite to the author…WorkingFixes:English (United States) →Русский (Россия) →Українська (Україна)Key: PauseStart when I sign in: onDetails for the authorDetails for the authorActing cycle:English (United States) →Русский (Россия) →Українська (Україна) ·no selection failuresCopyClose123
The “Diagnostics” section: “Fixes: …” lists the layouts in order, and “Details for the author” shows “Acting cycle: …” and “selection failures: …”.

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.

Questions and problemson GitHub Issues ↗ or by email: send.me@panda-pishet-kod.dev