JQuery - I Can't Detect Multiple KeyPresses

I'm trying to add shortcut keys to my page. I'm using jquery for keypress detection :

$(document).keypress(function(e) {
   if (e.keyCode == 65 || e.keyCode == 97){ // Keycodes for uppercase and lowercase 'A'
      alert('You pressed A');
   }
});

I can detect this A keypress. But when i try to add another detection for 'S' key both of them stops working. I try this one :

$(document).keypress(function(e) {
  if (e.keyCode == 65 || e.keyCode == 97) { // Keycodes for uppercase and lowercase 'A'
    alert('You pressed A');
  } else if (e.keyCode == 83 || e.keyCode == 115) { // Keycodes for 'S'
    alert('You pressed S');
  }
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

I tried switch case and declaring two different keypress functions too but none of them is working. Is there any limitation ? Why i can only detect one key ?