⚠️ Alpha software: expect bugs.
Small Windows app that automatically switches the keyboard layout depending on the foreground application.
Typical case: an AZERTY PC and a game that doesn't support AZERTY. AutoKbSwitch switches to QWERTY when the game gets focus and back to AZERTY when you Alt+Tab out. Any pair of layouts installed in Windows works.
brag.mp4
- One rule = one program (
cs2.exe) → one keyboard layout. - A default layout for everything else.
- Open-windows list to create a rule with a double-click (Windows system processes are hidden, with an option to show them).
- Lives in the system tray; the close button can either minimize to the tray or quit.
- Optional start with Windows.
- No polling: Windows notifies AutoKbSwitch when the foreground window changes.
- Install the .NET 8 Desktop Runtime (or newer) if you don't have it.
- Download
AutoKbSwitch.exefrom the Releases and check its SHA-256 against the provided checksum:Get-FileHash .\AutoKbSwitch.exe -Algorithm SHA256
- Run it. Windows SmartScreen may warn while the exe is not signed and not yet widely downloaded: More info → Run anyway.
- Open the window (double-click the tray icon).
- Pick a layout in the Layout box, select a program in the left list, then double-click it or press Assign →.
Note: AutoKbSwitch can only list and switch between the keyboard layouts that are already installed in Windows; it cannot add new ones. To add a layout (for example US QWERTY next to French AZERTY), see Microsoft's guide: Manage the language and keyboard/input layout settings in Windows. Then press Refresh in AutoKbSwitch (or restart it) to see the new layout.
- Open the Settings menu:
- Default layout: the layout used for every program that has no rule.
- Start with Windows: launch AutoKbSwitch hidden in the tray at sign-in.
- Start minimized in the tray: start AutoKbSwitch hidden in the tray instead of showing the window (the
--traycommand-line argument does the same for a single launch). Start with Windows always starts hidden. - Keep running in the tray when the window is closed: ticked by default. Untick it if you want the close button to quit instead (the automatic switching stops when AutoKbSwitch is closed). You can always use File → Quit.
The config is stored in %APPDATA%\AutoKbSwitch\config.json. Set the AUTOKBSWITCH_CONFIG environment variable to a full file path to use another config file (handy for testing).
- Game running as administrator: run AutoKbSwitch as administrator too, otherwise Windows blocks the layout-change message.
- Anti-cheat: AutoKbSwitch injects nothing and never reads other programs' memory. It listens for foreground-window changes and posts a layout-change message, like the Windows Alt+Shift shortcut does. There is no guarantee with any given anti-cheat: use at your own risk, especially in competitive games.
- The Windows Alt+Shift shortcut can clash with game keys; you can disable it in the Windows language settings.
- Config keys depend on the Windows display language: changing it can orphan existing rules.
AutoKbSwitch has no installer: it is a single AutoKbSwitch.exe. It only writes:
- its settings file,
%APPDATA%\AutoKbSwitch\config.json; - if you tick Settings → Start with Windows, one value named
AutoKbSwitchunderHKCU\Software\Microsoft\Windows\CurrentVersion\Run(current user only, no administrator rights).
To remove it completely:
- Untick Settings → Start with Windows (this deletes the registry value).
- Choose File → Quit.
- Delete
AutoKbSwitch.exe. - Optionally delete the
%APPDATA%\AutoKbSwitchfolder.
No data is sent anywhere. AutoKbSwitch does not use the network; the only outgoing action is opening the project page in your browser when you click the link in Help → About.
Requires the .NET 8 SDK. On Windows:
dotnet publish -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true -o publishor run build.bat. The result is publish\AutoKbSwitch.exe.
Official binaries are built by GitHub Actions from a tagged commit and published on the Releases page together with their SHA-256 checksum.
MIT © Holocron Factory (Loïc Ambrosini - CraZyBaLL)
The demo video uses the music "Happy Beats / Business Moves Vol. 9" by Sascha Ende (ende.app), licensed under CC BY 4.0, and sound effects by Kenney and unicae_games (OpenGameArt), both CC0.