yes... that's what we call a multiplexed keyboard.

perhaps those can be usefull:

http://www.melabs.com/resources/samples/x1/pbp/keyx.bas

http://www.rentron.com/PicBasic/crosspoint.htm