A matrix keypad consists of rows and columns. You need to connect the rows to the PLC's digital input and columns to the PLC's digital outputs. So if you use a T100MD888+ you need to reserve 4 digital inputs and 3 digital outputs for the keypad alone.
There is a sample program called "MatrixKeypad.pc6" in the "TRiLOGI\TL6\usr\samples" folder that you can follow to understand how the PLC can be programmed to handle a matrix keypad.