It's possible that you have a key-combination set to switch keyboard layouts. Most commonly this key combination is Ctrl+Shift. If you pressed this key combination by accident it's possible you switched keyboard layouts without realizing it.
spam