Keypad matrix for buttons

see here:

note that using this needs some coding skills

2 Likes