Is there a way to check if Shift + letter is pressed in lodash's debounce?
fetchDebounced: _.debounce(function(e) { if (e.keyCode === 16 && e.keyCode >= 46 && e.keyCode <= 90) { console.log('shift + letter is pressed') } } Doesn't work in my case, using it on keyup event. I want to print out console message, only when SHIFT+LETTER, for example, Shift+a is pressed (or Shift+z). Is it possible?
keyCodecan't be between 46-90 at the same time. Try using theshiftKeyproperty instead of checking the shift keyCode