While working on the next release of my Windows app for typing foreign characters and phonetic symbols, I stumbled on a pretty serious bug that affects the use of multiple keyboard layouts on Windows Vista, Windows 7 and (to a lesser extent) Windows 8.
What the bug looks like to the end user
Suppose your default Windows keyboard layout is US English, but you also want to use other keyboard layouts occasionally – maybe you’re an American learning French or a Pole who lives in the US, but wants to write in Polish every now and then. The Language Bar in Windows allows you to set a separate layout for each window, so let’s say you fire up Microsoft Word and change your layout to Polish.
Quick note: The Polish keyboard layout, like most non-English keyboard layouts, makes use of the right-hand Alt key, also known as “AltGr”, which is short for Alternate Graving. For example, to type the letter ł (pronounced like English w), you press AltGr+L.
After typing for a while, you decide to save your document. You bring up the Save As dialog box, type up a filename, and press OK. When you start typing again, you notice that you can no longer type any AltGr characters.
What’s going on? The act of opening the default Windows “Save As” (or “Open File”) dialog disables the AltGr key. The AltGr characters are not accessible in the dialog (you cannot use them in file names). More seriously, once you close the dialog, AltGr will remain broken in your application, even though the Language Bar will report that you are using the correct layout. At first, I thought it was lying, but it’s not – technically, the layout is still in effect. It’s just that the AltGr key is no longer working; it becomes a regular Alt key.
The same happens if your default Windows layout uses AltGr and you set just one window to a non-AltGr layout such as US English. If you open the “Save As” or “Open File” dialog, the right Alt key will turn into AltGr. This means, for example, that hitting right-Alt+F will no longer bring up the File menu.
Which versions of Windows are affected?
I’ve reproduced this bug on Windows Vista, Windows 7, and Windows 8. Windows XP seems immune.
Note that the default setting in Windows 8 is to have a single keyboard layout for all applications. This bug will affect you only if you specifically go to the language settings and choose the option to enable per-app keyboard layouts.
June Jul 6, 2014 at 10:31 am
The government controlled all radio broadcasts and newspapers.
Forex trading and the market as a whole is greatly influenced by US dollar.
We can get hold of a good knowledge of countless facts and figures by seeing the
Latest Breaking News.
anonymous Jul 31, 2014 at 12:57 pm
Would’ve been nice if you’d added a workaround for this. I just experienced it and its bloody frustrating being a software developer.
Tomasz Jul 31, 2014 at 5:37 pm
I did add a workaround for this specific bug to my TypeIt app.
July Jul 11, 2016 at 8:01 pm
Somebody else found that the problem is the Synaptics device driver, see http://superuser.com/questions/928555/issues-with-win-key-and-right-alt-key-after-windows-update-polish-diacritical-s
On my Dell laptop (with Synaptics touchpad driver) it happens time and again that suddenly AltGr + A (for ą) does not work any more, whereas AltGr + l (for ł) and all the other AltGr + … for Polish characters still work. After a restart AltGr + A works again.
This problem appeared on Windows 7 and still appears on Windows 10.
Tomasz Jul 12, 2016 at 12:34 pm
That’s a different issue.
Ems Nov 7, 2017 at 4:35 pm
Yeah – I have even better story. All Alt + (A,C,E,L,N,O,S,X,Z) work great in most apps, but in just one Alt+A stopped working correctly and it acts now as Ctrl+A. It happened several times and till now restart was enough to cure it. But now even restart does not help. Windows 10 x64 1607…