Replace serial monitor input with matrix keypad

Thank you for your swift response Jacksong. I'm pretty much a noob, so i'm struggling with the code a bit, learning as i go.

How do you propose I do that? Should I put this-

while (TravelX>0) {

Or is there another way to do it?