Introduction - If you have any usage issues, please Google them yourself
This a 4* 4 matrix keyboard scan function, using the state machine implemented without delay in order to eliminate shaking, just a timer interrupt function calls in about 10 ~ 12ms, thus saving time microcontroller