Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Key combinations

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
Hi,

I am trying to display an alert box if the user pushes Ctrl+M. So far I can make it do it by pushing M but am having problems detecting a key combination.

My script is as follows:

Code:
<script type="text/javascript"> 
document.onkeyup = KeyCheck;       
 
function KeyCheck()
{
   var KeyID = event.keyCode;
 
   switch(KeyID)
   {
      case 77:
      alert('User Menu');
      break; 
   }
}
</script>

Thanks very much

Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top