Q: When a shortcut key is pressed focus on select tag using angular I wanted my key shortcut (shift + c) to focus on the form's select tag when i press it like how tab works when its pressed.
In my html I have this form select tag


  
<select id="myOptions">
  <option selected> Options</option>
  <option>Option 1</option>
  <option>Option 2</option>
  <option>Option 3</option>
</select>


And here are the scripts that I tried to focus on the select tag but it does not work even in my console:
$document.on("keydown", function(event){
  if(event.shiftKey && event.keyCode === 67){
    angular.element(document.getElementById("myOptions")).focus()

    // a simple javascript does not focus it as well
    // document.getElementById("myOptions").focus()
  }
});


A: This works for me, using jQuery:
$(document).on("keyup", function(event) {
  if (event.shiftKey && event.keyCode === 67) {
    document.getElementById("myOptions").focus();
  }
});

Note the ); at the end, which you were missing.
