File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes How to use Alt+ arrow keys? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to use Alt+ arrow keys?" Watch "How to use Alt+ arrow keys?" New topic

How to use Alt+ arrow keys?

Debashree Halder
Ranch Hand

Joined: Jul 27, 2005
Posts: 81
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,

Debashree Halder<br />SCJP 1.5<br />Washington DC
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
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.

I agree. Here's the link:
subject: How to use Alt+ arrow keys?
It's not a secret anymore!