• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use Alt+ arrow keys?

 
Debashree Halder
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to use Alt+ arrow keys in IE browser?
I already tried some code it is not working:
function keyCapture(){
if (window.event.altKey)
{
alert('alt pressed');

}
}
I am calling this inside body tag on 'key press event'
It is not even calling the function while I press Alt+left arrow ket (say)
Please help,
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alt left and alt Right are two key combos I use all the tiome on the net. You may confuse your user's by switching the way they navigate through the net.

If you really want to do this, do a search for JavaScript modifier keys.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic