what is the key code for shift+tab?

Solution 1:

There's no "keycode", it's a separate property on the event object, like this:

if(event.shiftKey && event.keyCode == 9) { 
  //shift was down when tab was pressed
}

Solution 2:

e.keyCode has been deprecated for sometime. Use "e.key" KeyboardEvent.key instead.

Usage:

e.shiftKey && e.key === 'Tab'

Example:

function clicked(e) {
    if (e.shiftKey && e.key === 'Tab') {
        // Do whatever, like e.target.previousElementSibling.focus();
    }
}

Solution 3:

you can use the event.shiftKey property for that: http://www.java2s.com/Code/JavaScript/Event/Shiftkeypressed.htm