A method and apparatus are disclosed for using a general purpose
input-output (GPIO) interface to test a user input device such as a
wireless keyboard or mouse. Operation of key-scan logic can be tested by
the GPIO interface by temporarily disconnecting the outputs of the
various rows and columns and substituting signals generated by a test
algorithm into the input terminals of the key-scan logic. The test signal
is processed by the key scan circuitry and a key-scan output signal is
generated. This key-scan output signal is then compared to a known
reference output signal to determine if the key-scan logic and associated
circuitry is operating properly. Other embodiments of the GPIO testing
system can be used to test other user devices such as a computer
mouse/scrolling device.