Replace serial monitor input with matrix keypad

Your line [quote="infiman12, post:4, topic:910724"]

  TravelX= inputInt;

[/quote]

is only done if there is something in the Serial input buffer as you have

while (Serial.available()>0)  {

so that's a problem

Why don't you put the value directly into TravelX upon validation?