Is there an addEventListener
for the Enter key?
I have
document.querySelector('#txtSearch').addEventListener('click', search_merchants);
I know this is intended for <button>
, but wanted to know if there's an equivalent for catching the Enter key.