how to capture input from keypad?

If you post your code then perhaps we can see what's causing that behavior.