A game program KGP for playing a game by operating a keyboard connected
with a computer in response to a picture displayed on a monitor 9 has a
procedure for detecting and computing number of keys (S2 through S9), for
detecting and computing number of keys of the keyboard 17 connected with
a game machine body, and a procedure for setting key set (S9 through
S13), for setting one or more key sets on the keyboard according to the
number of keys if the detected number of keys is a predetermined number
of keys or more. Then, people can easily enjoy the keyboard game program
with only a general purpose keyboard, and it is not necessary to
specifically prepare a dedicated controller, thereby providing the game
program usable for various purposes.