I had a similar experience with my mechanical keyboard once. I turned on my computer, and it started typing gibberish like yours! I thought it was broken, but it turned out I just needed to clean the switches. A little compressed air did the trick.
Have you checked for any stuck keys...