Can the Keycode that is pressed during the firing of addEventListener input
be retrieved?
<p contentEditable="true" id="newTask">New task</p>
document.getElementById("newTask").addEventListener("input", function(e) {
if(e.keyCode == 13 || e.which == 13)
{
console.log("input event fired");
// return false; // returning false will prevent the event from bubbling up.
}
else
{
console.log("others: " + e);
// return true;
}
}, false);