FullOn3D has put up an article which explains the workings of a computer keyboard and its limitations in controlling games.
The fundamentals of modern keyboard design are quite antiquated and were certainly never intended to encompass multifunction game control. Unlike a standard digital joypad that has a wire for each button, a keyboard is a serial device that sends information down only one wire. This means that a computer can only receive key information sequentially regardless of the number of keys that are pressed simultaneously.Read more
Note: The standard game controller interface provides four digital connections and two analog connections and although parallel in nature this design is also quite antiquated and restrictive. For this reason most game controllers began to use these six control-lines in increasingly sophisticated ways in an effort to gain more functionality. For example the four digital lines could be used to represent a 4-bit code which facilitates 16 functions. This increase in sophistication eventually led to the abandonment of the old style parallel interface altogether, and today most game controllers plug directly into a USB serial port. The fact remains however that whereas these controllers have been specifically designed for games, keyboards connected to a serial port have not.