Assume I\'m a junior Wikipedia user that just want to experiment with changing some wikipedian content with the Wiki text editor in an edit-page, but not saving my changes in an
The keyCodes all represent modifier keys. The keypress
event does not fire with these keys:
document.addEventListener('keypress', function(e) {
console.log('keypress worked');
});
document.addEventListener('keyup', function(e) {
console.log('keyup worked');
});
Also, please note that .keyCode
is deprecated. Should use .key