Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 8th, 2004, 09:05 PM
Shindig Shindig is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 Shindig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question I need some serious coding help

I was wondering how to make keyboard keys correspond to certain links on a webpage. For example if there was a "maze" with the folowing screen:

North
West | East
South

(Imagine North, South, West, and East as links taking you to their respective direction)

How would I program it so that if I pressed the up arrow on my keyboard it would take me north, left arrow would take me west, etc.

Reply With Quote
  #2  
Old August 9th, 2004, 02:41 AM
coinhunter's Avatar
coinhunter coinhunter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Battle Creek, Michigan
Posts: 352 coinhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 5
Send a message via Yahoo to coinhunter
Look into using Javascript to capture when the arrows are pressed down.
You can use event.keyCode which returns the unicode value. The values are:

left arrow keyCode value: 37
up arrow keyCode value: 38
right arrow keyCode value: 39
down arrow keyCode value: 40

--------------------------------------------------------------------------------
Cast your vote in this form validation poll: http://forums.aspfree.com/t34569/s.html



Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > I need some serious coding help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT