An example for STM32 controllers can be found in the file matrix_keyboard_conf.h. You need to call the matrix_keyboard_task() function in your program every few tens of milliseconds; When a key is ...