"R1"? This is rather odd, but OK. I'm glad you've figured out Info Mode and learned how to look at the RX buffer. It sounds like you've got it set to display in ASCII mode.
What is the end game here - do you want to use the external keypad to enter numbers?
Put the unit in hex mode so you can see if there are any other characters like a carriage return or line feed. If you don't already know about asciitable.com it's a nice little resource. You'll need to strip the extra characters off each keypress and concatenate them together and convert them to a number.
Post a screenshot of what you're getting and the PLC program you've working with.
I am a newbie to unitronics and PLCs and I'm playing around with a unitronics V570, I have connected a number pad which communicates via RS232 to COM2 in my PLC. I have downloaded your sample code and changed the COM init to COM2. On the PLC info mode I can see the PLC is receiving the messages when I press the buttons (it's a 3x4 numbered key pad and I can see R1 on the RX pane on port 2 in the info mode when I press key 1, R2 when I press R2 and so on).
I want to display 1 when I press 1 and so on the text box.
Any guidance is greatly appreciated.