Skip to content

Add Layout Fix extension — convert text between Latin and any macOS keyboard layout - #1338

Open
akostt wants to merge 1 commit into
pilotmoon:masterfrom
akostt:feature/layout-fix
Open

Add Layout Fix extension — convert text between Latin and any macOS keyboard layout#1338
akostt wants to merge 1 commit into
pilotmoon:masterfrom
akostt:feature/layout-fix

Conversation

@akostt

@akostt akostt commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Adds a Layout Fix extension that feconverts text typed on the wrong keyboard layout back to the intended script.

  • 183 non-Latin macOS keyboard layouts (Russian, Ukrainian, Greek, Hebrew, Arabic, Korean, etc.)
  • Auto-detects the active layout at runtime; one installation works across all layouts
  • Handles Unicode NFC normalization (decomposed characters like й)
  • Pure zsh, no external dependencies beyond stock macOS tools

Examples

Input Output
ghbdtn привет
руддщ hello
asd!@#$%^&*() фыв!"№%:,.;()

Technical details

  • Reads active keyboard layout from com.apple.HIToolbox preferences
  • Layout catalog extracted from macOS via UCKeyTranslate (183 non-Latin layouts)
  • Handles both standard Mac Russian and Windows ЙЦУКЕН shifted symbols
  • Unicode NFC normalization for correct character matching
  • Fallback error messages when catalog is missing or layout is unsupported

Files

  • layout-fix.zsh — Main script (253 lines, pure zsh)
  • layouts.nonlatin.tsv — Layout catalog (183 layouts)
  • Config.yaml — Extension metadata
  • Readme.md — Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant