Code written to handle click events on input type text keypress