xxxxxxxxxx
$("input").keypress(function(){
//this code executes when the keypress event occurs.
});
xxxxxxxxxx
//Console log any key pressed into an input field with the class "topSearch"
$(".topSearch").keyup(function (e) {
console.log(e.key);
});