I am working on key mapping. The problem is that when I press the TAB button down it navigates to the next input field.
TAB has key of 9 and DO
e.keyCode has been deprecated for sometime. Use "e.key" KeyboardEvent.key instead.
e.keyCode
Usage:
e.shiftKey && e.key === 'Tab'
Example:
function clicked(e) { if (e.shiftKey && e.key === 'Tab') { // Do whatever, like e.target.previousElementSibling.focus(); } }