Hello all,
So, I just spend about two hours struggling with a keyboard problem and I _finally_ solved it. Thought I might share my thoughts here.
Have a ThinkPad R61i here with WinXP SP2. Since last night my right-alt key suddenly stopped working properly. Rather annoying as I have a whole bunch of hotkeys strung through my RAlt key. When e.g. pressing RAlt + p it produced ö. This was actually not due to AutoHotkey. Even when I exited AutoHotkey completely the problem persisted. What the key history in AutoHotkey DID show however was that whenever I pressed the RAlt key it would automatically be accompanied by a Ctrl keystroke!
Using windows on-screen keyboard (most people will find this under Start > Programs > Accessories > Accessability > On-Screen keyboard) showed something similar. As soon as I pressed the RAlt key the layout changed showing all these symbols.
After spending about an hour searching in the wrong direction (does it have anything to do with Sticky Keys perhaps? This in-built function in windows for disabled people. You can find it in Control Panel > Accessability Options > the tab "Keyboard") I finally came across
this post, which directed me to a
Wikipedia page on the RAlt key, or actually the AltGr key. The first link I just mentioned has the following quote from a previous version of this Wikipedia page
"On those keyboard layouts having a defined AltGr key, it is equivalent to holding down the Ctrl and Alt keys together ..."
And that was exactly my problem! I had just been setting up this system anew after a virus infection caused me to restore the system to factory defaults, and I guess that while twiddling around with some settings I must have changed the keyboard layout to US-International.
The solution? There are only a few layouts where the RAlt key is not defined as a AltGr key, and the United States layout is one of them (see
here) So, I went to Control Panel > Regional and Language Options > the second tab "Languages" and in the field "Text services and input languages" clicked on "Details". This opens another window "Text Services and Input Languages". In the second field "Installed Services" I had two keyboard layouts listed "US-International" and "US" with "US-International" being highlighted as it was currently in use. I selected that one, clicked on the "Remove" button and selected the "US" layout. One reboot later and, presto, the RAlt key is behaving like the RAlt key again, and not like an AltGr.