Skip to content

Conversation

@qqrm
Copy link
Owner

@qqrm qqrm commented Jan 27, 2026

Motivation

  • Ensure & is considered Latin punctuation when choosing conversion direction so layout selection behaves correctly for mixed text.
  • Support the physical key mapping where & (EN) corresponds to ? (RU) on shifted 7 in the Russian layout.

Description

  • Updated is_latin in src/domain/text/mapping.rs to include & as Latin punctuation so it contributes to Latin dominance counting.
  • Added reciprocal punctuation mappings in src/domain/text/mapping.rs: ? => '&' in map_ru_to_en and & => '?' in map_en_to_ru to reflect the shifted 7 key behavior.
  • Added a new test ampersand_prefers_latin_direction_when_present in src/tests/mapping_invariants_tests.rs that asserts convert_ru_en_bidirectional("a&") == "ф?" and convert_ru_en_bidirectional("я?") == "z&".

Testing

  • No automated tests were executed in this rollout; changes include unit tests that will run under the repository test suite (e.g. cargo +nightly test --locked).

Codex Task

@qqrm qqrm merged commit a18d07f into dev Jan 27, 2026
1 check failed
@qqrm qqrm deleted the codex/add-rules-for-ampersand-mapping branch January 27, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants