In Windows 7 (and possibly Vista) the keyboard layout is sometimes changed back to some sort of default.
The problem shows itself like this - I use the 1337 keyboard layout in Visual Studio. Then without warning the keyboard layout changes to US layout; a layout I don't even have installed. The 1337 layout is based on US though so somehow it shines through.
To get back to 1337 I choose "Open the language bar" in the systray context menu. The language bar then pops up in another place (top of screen for me) and I can then choose keyboard layout.
The problem will reappear more times until I reboot again.