I was trying to call a function on the press of the shift + enter key.
What I was trying is this
$('.o_searchview_input').on('keydown', function(event) {
debugger;
if (event.keyCode == 13 && !event.shiftKey) {
$(this).trigger(jQuery.Event("keydown", {
keyCode: 13, // ENTER
shiftKey: true
}));
} else if (event.keyCode == 13 && event.shiftKey) {
console.log('shift + enter');
}
});
But it is pressing the shift key automatically.
I am worried is there any option in JavaScript to trigger an even on the press of two keys?