Keyboard layout fixer (EN ⇄ AR)
text_layout_fixConvert gibberish typed in the wrong keyboard layout between US English and Arabic, turning mistyped words into readable text while leaving correct words untouched.
Instructions
Fix text typed with the wrong keyboard layout between US English (QWERTY) and Arabic (101): "hgsghl ugd;l" becomes the Arabic greeting, and Arabic gibberish typed on English keys becomes "hello". Direction "auto" detects it; in mixed text only the words that look mistyped are converted (using small English/Arabic letter-pair models), so words that are already right stay as they are. Handles the shift layer (harakat, hamza forms), lam-alef keys and Caps Lock (all-caps Latin input is treated as lowercase). Web version: https://s3eidat.github.io/layout-fixer/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Or: a path to a UTF-8 text file. | |
| text | No | The mistyped text. | |
| capsLock | No | Caps Lock was on: treat capital Latin letters as lowercase (detected automatically when all letters are capitals). | |
| direction | No | "auto" (default) detects; "ar" = typed on English keys, convert to Arabic; "en" = typed on Arabic keys, convert to English. | auto |