facetwp submit button on enter

(function($) {
    $(document).keypress(function(event){
        var keycode = (event.keyCode ? event.keyCode : event.which);
        if(keycode == '13'){
            FWP.parse_facets();
            FWP.set_hash();
            $( ".fwp-submit" ).trigger( "click" ); 
        }
    });
})(jQuery);