I called the methods in the onKeyPress() but I don't understand why this isn't working