Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to assign keys to links

    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.

    I've looked in numerous places, asked many people but no one can produce an answer, it would be great if one of you can.

    PS. This is for IE 6
    Last edited by Shindig; 08-10-2004 at 10:21 AM.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    What do you mean by "take me north, west, ..."?
    Do you mean that when you press the UP arrow, the page would automatically go to the location specified in the North link? Or just focus on the North link?

  • #3
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What I mean is, if I pressed the up arrow it would produce the same effect as actually clicking on north with the mouse. Same with the other directions and the other arrow keys.

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you provide a picture of what you're saying? Like a literal GIF or JPG or something -- I still don't get it, it's too ambiguous.

    Sadiq.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Collaborative Project: Event Handler Abstraction

    See the script in the second to last post in this thread , it's a nice utility that you can use to find information you'll need to make the script you want and also serves as an example of how to capture those keyboard events and respond to them.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #6
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sad69
    Can you provide a picture of what you're saying? Like a literal GIF or JPG or something -- I still don't get it, it's too ambiguous.

    Sadiq.
    here's a picture
    Attached Thumbnails Attached Thumbnails How to assign keys to links-pit.gif  

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    What happens if you click North, East, West and South links?

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    While everyone else seems to be mystified by your request, have you even looked at my response? Did it make any sense to you?

    My understanding, just like the arrow keys cause your character to move through the landscape in a computer game you want to use the arrow keys to navigate through web pages.

    The script I liked to shows how to capture keyboard events (like pressing an arrow key) and as the script is currently written (by Dave Clark who used to be a regular here and is still missed by those of us who remember him) also displays the internal "keycode" for the key which is pressed. That makes the script a utility which can be used to find the keycodes you'll want to watch.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •