Instead of your kid ruining your Mac by pressing on any random key, why not installing a program like AlphaBaby which disables all key functions and instead outputs images or sounds relating to the letter pressed.
Not only will your Mac be safe from your kid's curious hands but it'll also allow him (or her) to learn the alphabet. Beware though that it will launch immediately as soon as you start it, bringing up a white screen.
Controls to exit are shown at the bottom left of the screen.
The program features its own set of images and sounds but you can also add your own.
The process is not as streamlined as we'd have wished it but it works fairly well. We suggest setting your own pictures though, as not only will it make the learning process more personal, but it'll also allow you to use AlphaBaby as a sort of screensaver.
To help your kid assimilate the alphabet you can also activate the 'Speak the letter' function, which pronounces a letter when the corresponding key is pressed using your Mac's text-to-speech technology.