Refactored for keypress

Added keypress on text box, refactored to executeTextbox