This question has been asked and answered multiple times, however no solution worked for me.
Solutions in escalating complexity:
- Click the language in the language bar, select "Language preferences", select the rogue language, click "Remove". If the language is not present in the list, go to step 2.
- Click the language in the language bar, select "Language preferences", select "Add a language", find it in the list and add it (make sure to select the correct sub-category for your rogue layout), select it in the list of languages, hit "Remove". The language should now be gone. If it returns at a later date, go to step 3.
- Regedit time. (Editing your computer's registry can have unintended consequences and can lead to system instability. Please only do this if you are sure you know how the registry works.) Open the start menu, search for "regedit" and run regedit.exe, navigate to "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Keyboard Layout", making sure not to confuse it with "Keyboard Layouts". Right click in the right panel, select New > DWORD, name it "IgnoreRemoteKeyboardLayout", double click it and set the value to 1. Close regedit, remove the rogue keyboard manually (using steps 1 or 2) and restart your computer. This should fix 99% of problems with rogue keyboard layouts. (Source) If it however returns, go to step 4.
- Hopefully your problems will have been fixed before you got to this step, as it's merely a mitigation, not a solution. If none of the previous steps worked, then start regedit again, navigate to "HKEY_USERS/.DEFAULT/Keyboard Layout/Preload", look at the values of the attributes here. They should be enumerated 1, 2, 3, ... and they correspond to the currently active keyboard layouts. note down the values (for example 00000424 and 00000409). Now navigate to "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Keyboard Layouts" and expand it. You will see many folders. Find the ones with the same numbers as the ones you just wrote down. For each of them, select it in the tree on the left and look at the "Layout Text" property. Using this, identify BOTH the rogue keyboard layout and your preferred keyboard layout. If you cannot find the rogue one, then manually add it like in step 2, look at the "Preload" folder again to find the new entry and then find that in the expanded Keyboard Layouts folder. Please note that deleting the keyboard layouts folder of the rogue keyboard won't work, it will be restored. Once you have identified the folders for your preferred and rogue keyboard layouts, look at the "Layouts File" property for your preferred one. Copy its value and paste it into the rogue keyboard layout's "Layouts File" property. Once you have done this, turn close regedit, remove the rogue keyboard again like in steps 1 or 2 and restart your computer. From this point on if the rogue keyboard returns, it might say "English (United States)" or whatever, in the language bar, but it will behave exactly the same way as your preferred one. If you use two keyboard layouts and frequently switch between them, you might want to consider simply swallowing your pride and keeping the (modified) rogue keyboard. So, for example, if you routinely use Spanish and Italian, but English US often appears out of nowhere, you might edit English US to point to the Spanish keyboard layout and then remove the Spanish one.