What brand is the keypad? Does the Keypad has an RS485 port? Is it capable of sending ASCII strings out when a key is pressed? If so then it is possible to connect its RS485 port (provided it has one) to the PLC's RS485 port and the PLC can then read the data sent from the keypad and interpret the data. The PLC uses commands such INPUT$, INCOMM to read data from its serial port and the data can then be interpreted in whatever way you program it to do so.