Documentation · Hotkey and layouts
Lang Switcher: capitals, Caps Lock and punctuation
The program remembers the keys you pressed, not the letters, and asks Windows what the same key types in the other layout: Shift+2 types @ in the English layout and " in the Russian one.
Keys, not letters
The program remembers every keystroke: which key it was, whether Shift, Caps Lock or AltGr was on, and which layout was active. When you press the hotkey, it asks Windows what the same key, with the same Shift and Caps Lock, types in the other layout. That’s why punctuation comes out right along with the letters: вщтэе turns into don't, because the apostrophe in the English layout sits on the same key as э in the Russian one.
Capital letters
A capital stays a capital: Руддщ → Hello, РУДДЩ → HELLO. The second press brings back what you typed, letter for letter, capitals included.
Caps Lock
- When
Caps Lockis on, the program treats it the way it treatsShift: the word comes out the way it would have if you’d typed the same keys in the other layout withCaps Lockon. In the English layout,Caps Lockdoesn’t affect punctuation, but in the Russian one some of those same keys are letters:ВЩТЭЕ→DON'T. - An accidental
Caps Lockisn’t fixed: the program won’t turn “hELLO” into “Hello”. That’s a different problem, not a layout one. CapsLockas your hotkey. You can choose it, as the hotkey page explains. Then, while the program is running,CapsLockno longer turns on capitals: the program keeps its hotkey for itself.
Numbers and punctuation
The digits are the same in the English and Russian layouts, but the symbols above them, typed with Shift, aren’t:
| Key | English | Russian |
|---|---|---|
Shift+2 |
@ | " |
Shift+3 |
# | № |
Shift+4 |
$ | ; |
Shift+6 |
^ | : |
Shift+7 |
& | ? |
/ and Shift+/ |
/ and ? | . and , |
Other layouts have their own symbols on these keys, and the program asks Windows about them in the same way.
- A symbol the key doesn’t have in the other layout stays as it was.
- Dead keys, the accent keys of layouts like French or Spanish, combine with the next letter just as Windows combines them. Meant to type
êtrein French but got[etrebecause US was on?Pauseturns it intoêtre, andêtyped in French turns into[ein US. The program takes these combinations from the layout itself. - Right
Altin a layout withoutAltGr, like US, is read asAltGrwhen the key you press with it types a letter withAltGrin another of your layouts. Typemąkaas you would in Polish (Programmers), but with US on, andPausefixes the whole word: rightAltwithAcounts as the letterą, not a command. - In the classic console, a word with a dead key or
AltGrin it still isn’t replaced, and you hear the refusal sound (see Console). - A character typed with
Altand digits on the numeric keypad doesn’t become part of the word: the program treatsAltwith a digit as a command, and the word is forgotten.
Spaces
Spaces after the word carry over as they are: руддщ → hello , and the layout switches. The next letter starts a new word.
Selected text
Selected text has no keystrokes, only letters, so the program works the keys out from the letters, each word from its own layout. With Arabic and similar layouts, where one key can type two letters, the letters alone don’t always tell which keys you pressed. A word you’ve just typed in the same field is converted by the keys you actually pressed, and other text by the letter statistics of the language it’s being converted to. The program has these statistics for ten languages, English, Russian and Arabic among them; with any other language, such a word is split into single keys. Capitals stay capitals. Numbers follow two rules: a comma between digits in Russian text becomes a period (“5,1” → “5.1”) and the other way around, and a date selected in English text gets commas instead of periods when it goes into Russian: “12.09” → “12,09”.
See also
Questions and problemson GitHub Issues ↗ or by email: send.me@panda-pishet-kod.dev