Handle keypress on text inputs only