Without any evidence, it's difficult to see what's wrong, but you're reading the keypad twice each time.
If this flushes key presses, you'll only log every other press.
Without any evidence, it's difficult to see what's wrong, but you're reading the keypad twice each time.
If this flushes key presses, you'll only log every other press.