This is a library with sample code to use a 4x5 or 5x4 Matrix or keypad with an ATmega AVR controller.
git clone https://gitbucket.pgollor.de/git/kalle/matrix4x5.git cd matrix4x5 make all
Read LICENSE.md
Makefile comes from mikrocontroller.net.