The following code works. It allows you to press the enter and escape buttons. Here is a jsFiddle
$(document).on('keydown', function(e){
if (e.which == 13){
// Enter Key pressed
}
});
$(document).on('keydown', function(e){
if (e.which == 27){
// Esc Key pressed
}
});
My question is how would I remove the binding for just the enter key?