Answers for "javascript e.keycode deprecated"

2

javascript e.keycode deprecated

// Use e.key instead;
document.inputDiv.addEventListener('keyup', (e) => {
	console.log(e.key);
});

// Typing 'hello world' will log --> 'h' 'e' 'l' 'l' 'o' ' ' 'w' 'o' 'r' 'l' 'd';
Posted by: Guest on February-11-2021

Code answers related to "javascript e.keycode deprecated"

Code answers related to "Javascript"

Browse Popular Code Answers by Language