For a specific answer, please provide more information, such as the program you were using. Off hand, though, I'd guess that the word processor recognized a common mistake (not leaving a space between two words) and corrected it automatically. Cleaning your keyboard wouldn't have any effect on you computer automatically adding a space.
Hope this helps,
I cleaned my computer keyboard and when I went to write a letter and I needed a space between two words it skips foward one space. this only happens foward ..........pleaseh elp???????