473,382 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

mouseless navigation

Hi,

Can someone give me broad tips on whether it is possible to make a site
keyboard navigatable?

I know that you can do it with "tab" but in most cases that's annoying. I'm
curious whether it is possible to assign shortcut keystrokes to certain
buttons, links, etc.

Many thanks!

Aaron Fude
Jul 23 '05 #1
2 1243
Aaron Fude wrote:
Can someone give me broad tips on whether it is possible to make a site
keyboard navigatable?

I know that you can do it with "tab" but in most cases that's annoying.
I'm curious whether it is possible to assign shortcut keystrokes to
certain buttons, links, etc.


This has nothing to do with client-side scripting (and should not,
since it can be restricted, disabled or not even present).

<http://www.w3.org/TR/html4/interact/forms.html#adef-accesskey>
HTH

PointedEars
Jul 23 '05 #2
"Aaron Fude" <aa*******@yahoo.com> wrote in message news:<cf***********@news.wplus.net>...
Hi,

Can someone give me broad tips on whether it is possible to make a site
keyboard navigatable?

If the html access key solution does not meet your needs, here is a
javascript function that intercepts key presses. The code follows.
Robert
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>shortcut keys</title>

<SCRIPT type="text/javascript">

function processKey(event)
{
if ( typeof event == "object" &&
typeof event.which == "number")
{
// Netscape
alert("event.which = " + typeof event.which + " " + event.which
+
" event.shiftKey = " + event.shiftKey +
" event.ctrlKey = " + event.ctrlKey +
" event.altKey = " + event.altKey +
" event.metaKey = " + event.metaKey);

//control-y goes to yahoo
if (event.which == 121 && event.ctrlKey == true)
{
location.replace("http://www.yahoo.com");
return false;
}

}
else
{
// We assume IE
/*
Big worning: For some reason if you put out an
alert here, the letter will not get get inserted into
a text field.

alert("window.event.keyCode = " + event.keyCode);
*/

// The Netscape & IE keycodes differ.
// It seems easyist just to insert the above alter and see
// what number is shown.
//
//control-y goes to yahoo
if (window.event.keyCode == 25)
{
alert("replacing");
location.replace("http://www.yahoo.com");
return false;
}

}

return true;
}
/* Looks like you can either set the event handler via the
statement below or in the onkeypress event handler of the
html body statement. If you use the statement below, you
will not be passing the event variable to the function
processKey and you will have to preference window to
the event variables for the IE portion of the code.

document.onkeypress = processKey;
*/

</SCRIPT>
</head>
<body onkeypress='return processKey(event);'>
<p>Lets look for a key press.</p>
<form>
<input type=text size=20>
</form>
</body>
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave Patton | last post by:
Using my About page as an example: http://members.shaw.ca/davepatton/about.html What is the best/proper way to markup a page such as this that has "the main body" and "a navigation menu"? It...
0
by: Veli-Pekka Tätilä | last post by:
Hi, My first post here. I've found some serious accessibility flaws in the Python 2.4 docs and wish they could be rectified over time. I'm very new to Python and initially contacted docs at python...
1
by: Robert Neville | last post by:
I am having some trouble with some old code revolving around custom form navigation buttons. My main form has a sub-form with these custom navigation buttons. In other words, the code should be...
4
by: Sandy.Pittendrigh | last post by:
I don't want to get into a frames discussion here. We all know they have numerous drawbacks, especially with search engine visibility. (Google, ironically, uses framesets for displaying individual...
28
by: laredotornado | last post by:
Hi, Surprisingly, I can't get the drop down menus to work on PC IE 6. If you roll over "PRODUCTS", normally a drop down menu appears (on Safari and Firefox), but on PC IE, nada. ...
3
by: Paul | last post by:
I want the <div id="navigation"column to be the same color all the way to the bottom. The "background-image: url(bg_menu_tile.gif);" was a try to force it with a long 1-pixel graphic - didn't...
10
by: EA | last post by:
I am sure I must be missing something about building navigation bars with CSS. Yes it is a very clever and efficient way to format navigation structures on simple one navigation level webs, i.e....
1
by: quartzy | last post by:
I have a strict doc type: However, I am still unsure about css. Problems I have now are to do with floating both navigation lists. I have used tables and divs, as layouts are just too difficult for...
0
by: emalcolm_FLA | last post by:
Hello and TIA for your consideration. I have created several db's for a non-profit and they want custom navigation buttons to display "You are on the first record, last record, etc". With this...
0
by: tom59593 | last post by:
Hi there. I have been attempting (for a few days on end, sadly) to get a navigation section of my new site to work. Granted, this is the first time I've ever written CSS...although I had PLENTY of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.