You can use keyboard hooks to hijack the keyboard. I might start by looking for SetWindowsHookEx
calls in your code. Maybe try running your program normally and Notepad as Administrator; keyboard hooks don't work with higher privilege processes, so that might narrow down the problem a little.
You can change keyboard layout within your code, but only by changing the registry, and it requires a restart before it works (or at least a logout, maybe) -- so I highly doubt that that's the culprit.
As Jose notes, the input layout may have also changed. Go into the Windows Region and Language settings and under Keyboards and Languages -> Change keyboards -> Language Bar, choose Floating On Desktop. Try changing around several applications to see if the input language is getting switched. If it is, you should turn off any keyboard layouts that you're not using (you probably won't need English), or hit left alt + shift
whenever the language gets switched.