JQuery script method to ignore the execution of the event listener function and execute it only if I press the Enter key on the keyboard : I need to create a JQuery script method to ignore the execution of the keyup or keypress event listener function and execute it only if I press the Enter key on the keyboard.

        $(document).on("keypress","input", function(e) {
        var keyCode = e.keyCode || e.which;
        if (keyCode != 13) { 
        console.log('Not enter')

        }else{
          
        }
    });