The win-search-aliases tool allows you to add custom keyboard layouts if your preferred layout is not supported out of the box.
Keyboard mappings are defined in a TOML configuration file located at:
src/win_search_aliases/config/keyboard_maps.toml
- Open the
keyboard_maps.tomlfile in any text editor. - Add a new section for your layout under the
[maps]table. - Provide a unique ID for your layout (e.g.,
es-qwerty). - Add a
descriptionfor clarity. - Define the
mappingdictionary where the keys are the English (US QWERTY) characters and the values are the corresponding characters in your layout.
If you wanted to add a hypothetical layout, it would look like this:
[maps."my-custom-layout"]
description = "My custom keyboard layout typed from a US QWERTY keyboard"
mapping = { q = "1", w = "2", e = "3", r = "4", t = "5", y = "6", u = "7", i = "8", o = "9", p = "0", a = "a", s = "b", d = "c", f = "d", g = "e", h = "f", j = "g", k = "h", l = "i", z = "j", x = "k", c = "l", v = "m", b = "n", n = "o", m = "p" }If you want the win-search-aliases auto command to automatically detect and apply your new layout when it is active in Windows, you must also map it in the profiles.toml file located at:
src/win_search_aliases/config/profiles.toml
Add your layout ID as a key, and provide an array of Windows Language/Keyboard Profile IDs as the value. You can find the list of Windows keyboard identifiers here.
[profiles]
# Example: Mapping "my-custom-layout" to Spanish (Spain) and Spanish (Mexico)
"my-custom-layout" = ["00000C0A", "0000080A"]If you add a standard layout that could be useful to others (e.g., German QWERTZ, French AZERTY, etc.), please consider contributing it back to the project!
- Fork the repository.
- Add your layout to
keyboard_maps.toml. - Create a Pull Request (PR) with a brief explanation of the added layout.