Introduction - If you have any usage issues, please Google them yourself
Here in great detail how to prepare a 4* 4, the ranks of scanning keyboard (which has passed keil compiler and use). The program I use P1 as the ranks of scanning ports, it can identify whether a number of key press, whether the release button. Speaking for beginners is a good source