discriminate between keypress for input field and normal

discriminate between keypress meant for any input element and normal
keypress. Now ignoring keypresses of the former case