The Lay project has recently been released, offering a solution for correcting words typed using the wrong keyboard layout in the Wayland-based GNOME environment. This utility corrects the last word typed in the wrong Russian or English layout by double-pressing the Shift key. The code is written in Rust and is distributed under the MIT license. While at the beta stage of development, users are encouraged to submit bug reports to help improve the program.
The main purpose of Lay is to assist users who mistakenly type words in the wrong layout. For example, if a user types “ghbdtn” instead of “hello”, they can simply press Shift twice to have the word automatically retyped in the correct layout. This correction process occurs locally, without the need to copy and paste text via the clipboard. Lay simulates pressing the Backspace key to erase the incorrectly entered word before retyping it in the proper layout. The program also aims to avoid altering correctly typed neighboring words in mixed text, ensuring accuracy. Additionally, Lay offers the possibility of precise auto-substitution of words based on the user’s dictionary.