Bug: Punctuation preservation breaks conversion between US and Russian PC keyboard layouts
Hello!
First of all, thank you for developing LangSwitcher. It's a very useful application, and I really appreciate your work on it.
I've noticed an issue when converting text between the English (ABC / US) and Russian PC keyboard layouts on macOS.
Problem
Letters are converted correctly, but punctuation marks are not always converted to their corresponding characters in the target layout.
I understand that LangSwitcher intentionally preserves punctuation during conversion. However, this causes problems when switching between keyboard layouts where punctuation marks and letters occupy different physical key positions.
For example, in the Russian PC layout, some keys that produce punctuation marks in the US layout produce Russian letters or different punctuation marks.
As a result, when I type text using the wrong keyboard layout and convert it with LangSwitcher, the letters are corrected, but punctuation marks remain unchanged or are converted incorrectly.
Specific examples
When converting from English (US) to Russian PC, I expect the following mappings:
English (US) | Russian PC -- | -- . (period) | ю ? (Shift + /) | , / | . , | б ; | ж ' | эFor example:
If I type a period (
.) using the English layout, it should becomeюafter conversion to Russian PC.If I type a question mark (
?), it should become a comma (,) after conversion.If I type a slash (
/), it should become a period (.).
The same principle should work in the opposite direction when converting from Russian PC to English (US).
Expected behavior
I would like LangSwitcher to convert all characters, including punctuation marks, according to their physical keyboard key positions in the source and target layouts.
In other words, the conversion should preserve the physical key positions rather than the visual characters.
Currently, letters follow this logic, but punctuation marks are treated differently.
Possible solution
Could you consider adding an option in the application settings to control punctuation handling?
For example:
Preserve punctuation — current behavior.
Convert punctuation according to physical key positions — the behavior I'm looking for.
This would make LangSwitcher much more useful for users working with layouts such as English (US) and Russian PC.
Environment
macOS
Apple Silicon (M1)
Source layout: ABC (US)
Target layout: Russian – PC
Conversion shortcut: Double Shift
I would be happy to provide additional examples or help test a potential fix.
Thank you for your time and for maintaining this project!