JSFiddle - React, Tailwind, and code Playground
HTML
<form id="search" class="search"><input class="searchTerm" placeholder="Filter Books..."><input class="searchButton" type="submit"></form>
<div id="status"></div>
JavaScript
$('.searchTerm').keyup(function (e) {
$("#status").text("");
if (e.ctrlKey) {
if (e.keyCode == 65 || e.keyCode == 97) { // 'A' or 'a'
console.log("controll pressed");
e.preventDefault();
return false;
}
}
$("#status").text("This should not work if cntrl+a is pressed");
});