Consider how the Atari keypad operates. The keypad itself has twelve buttons ordered in four rows of three columns. Seven pins of the nine pin connector are used as a means of gathering the current state of the twelve-button keypad. Each row and each column are assigned a pin. The row pins are acting as digital inputs and the column pins are acting as digital outputs.
The console effectively scans through each column by holding the column pin low and reading the digital state of the four row pins. If the state of a given row is read as being low, then that row is electrically connected to the column pin by the physical act of pressing the button. This process is repeated until all three columns are read. It is the combination of column pin and row pin that determines the key that is being read, as follows:
pin 5 pin 9 pin 6
pin 1 key 1 key 2 key 3
pin 2 key 4 key 5 key 6
pin 3 key 7 key 8 key 9
pin 4 key * key 0 key #
It is possible to electrically emulate this pressing of buttons. The process involves the 4016 quad analog switch IC.
Example video: http://www.youtube.com/watch?v=6uBJKJaBAn4
I am sure that there is more of this to come.