how to capture input from keypad?

It seems to always be returning false, like it's not waiting until the full code it put in.